Package: fattmerchant
Fattmerchant Python ClientThis package aims to provide assitance while interacting with theFattmerchantrest API.This is the official python client which is supported by fattmerchant and bugs/issues/feature-requests can be posted on the officialgithubpage.Python client documentation atreadthedocsbuild statusInstall# pre-req, you need Xcode cli tools:
xcode-select --install

# THEN:
brew update
brew install pyenvNow, follow this guide to set up your $PATH.https://github.com/pyenv/pyenv#homebrew-on-macosMake sure you have a.zshrcOR.bash_profilefile:# zsh
vim ~/.zshrc

# bash
vim ~/.bash_profileFor either Zsh or Bash, paste into your rc file:# Init Pyenv (if it exists) for all new shells
if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fisource ~/.zshrc
# OR
source ~/.bash_profileNow Install The Python Binarycd path/to/project

# First check python version
`python --version`

If python version comes up to be 3.x.x then skip to creating virtualenv


# this is the current version we use
pyenv install 3.8

# so far it's installed but not used
# use it globally
pyenv global 3.8
source ~/.zshrc
# or ~/.bash_profile

# Create Virtualenv
pip install virtualenv

# do this anywhere you have a python project
virtualenv venv

# source the venv
# Note that virtualenv activates the python versoin ONLY for your current session, (your terminal Tab)
`source venv/bin/activate`

# this will install yapf and everything else in requirements.txt
pip install -r requirements.txtNote: If you get an error about zlib, then you may need to install with Homebrew before installing the python binary.When done using venv# within your venv session...
deactivateVSCode SettingsIn VScode installPython ExtensionsIn.vscode/settings.jsonenter this:{
  "python.pythonPath": "venv/bin/python",
  "editor.formatOnSave": true,
  "python.formatting.provider": "yapf",
  "python.linting.flake8Enabled": true,
  "python.linting.pylintEnabled": false,
  "python.linting.enabled": true,
  "restructuredtext.confPath": "${workspaceFolder}/docs/source"
}Then, if VSCode asks you to install anything like flake8 just click "yes".Then, Select the Python binary asvenvin VSCode:SDK Usage (For client)Ensure that you have fattmerchant installed from pypi
create a new file fm_client.py
and put the following codefrom fattmerchant.client import FMClient	
fatt = FMClient(	
    "YOUR_API_KEY_HERE",	
    "local"	
)API key can get requested fromhttps://fattmerchant.com/omni-overview-lp/Test the packageGo totests/static_datadirectory and create a file called "API_KEY" and
paste your API Key in this file.(Sometimes this does not work as expected because of 1.Pasting the key with quotes 2.Having an extra line in the file.)This file is added to gitignore to make sure that you never accidentally commit it.At the moment we jut have Basic_tests.py file working.To test the file you can runWindowspython -m unittest tests\Basic_tests.pyMac/Linuxpython -m unittest tests/Basic_tests.pyDeveloper should model their tests similar to what is written here.Ideally there will be a separate file for each controller/module.Update Read the DocsIf adding a model or controller, make sure you add the new.rstfile toocontrollers.rstormodels.rstThen add a new.rstfile within the controllers or models directory in this format :My New Model/Controller
 ========
 .. automodule:: fattmerchant.controllers/model.my_new_model_or_controller
     :members:Deploy changes (to master)Get login credentials to Read the DocsOnce logged in, go into theFattmerchant Python SDKprojectGo into the builds tab and click on theBuild Versionbutton, whilelatestis selectedVerify docs are updated successfully.Release to PyPiIncrement version number in these files:./setup.py./docs/source/conf.pysource venv/bin/activate

# this will install yapf and everything else in requirements.txt
pip install -r requirements.txt

make uploadIf you get an auth error, before you fix your password and try again, clear thedistfolder:rm -f dist/*.gz && rm -f dist/*.whlThe project is released here:https://pypi.org/project/fattmerchant/