Package: altf1be-sca-tork-easycube-api
altf1be_sca_tork_easycube_apiHelpers for SCA Tork Easycube API facilitating the collection of data generated by the dispensers Built byhttp://www.alt-f1.be.Seehttps://bitbucket.org/altf1be/com_torkglobal_easycube_fmhttps://easycube.sca-tork.com/en/Plan/Indexhttps://fm.easycube.torkglobal.com/enhttps://easycube-external-api-web-c2m2jq5zkw6rc.azurewebsites.net/swaggerAuthor: Abdelkrim BOUJRAF,http://www.alt-f1.beScreenshotcd web; ./run_web.shopen a browserhttp://0.0.0.0:8000/api/dispensers/sca_tork_easycube/Display actions required per dispenser:UsageCreate a .env including this parameter COM_GOOGLE_ANALYTICS_TRACKING_IDexportSCA_TORK_EASYCUBE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxexportSCA_TORK_EASYCUBE_CLIENT_SECRET=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaaexportSCA_TORK_EASYCUBE_GRANT_TYPE=client_credentialsexportSCA_TORK_EASYCUBE_SCOPE=EasyCube.External.ApiexportSCA_TORK_EASYCUBE_BASE_URL=https://easycube-external-api-web-c2m2jq5zkw6rc.azurewebsites.netInstall the pyhton packagespipinstall-rrequirements.txtload the .env in your entry point (app.py, main.py, test.py)fromdotenvimportload_dotenv

load_dotenv()Run the code and check if the you can access to the REST APIpythonimportaltf1be_sca_tork_easycube_apiprint(dir(altf1be_sca_tork_easycube_api))# ['AltF1BeHelpers', 'AltF1BeJSONHelpers', 'DISPENSER_TYPE_NOT_FOUND', 'Dispensers', 'DispensersModel', 'ERROR_UNKNOWN', 'SCATorkEasyCubeAPI', 'SCATorkEasyCubeAPIAuthentication', 'SCATorkEasyCubeAPIHelpers', 'STATUS_UNKNOWN', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'credentials_filename', 'datetime', 'dispensers', 'dispensers_model', 'glob', 'json', 'load_dotenv', 'log_filename', 'logger', 'logging', 'np', 'os', 'pd', 'requests', 'sca_tork_easycube_api', 'sca_tork_easycube_api_authentication', 'sca_tork_easycube_api_helpers', 'sys', 'time', 'timezone']installationinstall the package onpypi.org:install :pip install altf1be_sca_tork_easycube_apiupgrade :pip install altf1be_sca_tork_easycube_api --upgradeinstall the package ontest.pypi.org:install :pip install -i https://test.pypi.org/simple/altf1be_sca_tork_easycube_apiupgrade :pip install -i https://test.pypi.org/simple/altf1be_sca_tork_easycube_api --upgradedependenciesSeerequirements.txtBuild this packagebuild the setup.pypython3 setup.py sdist bdist_wheelpython3 -m pip install --user --upgrade twine --use-feature=2020-resolverupload the library on TESTpypi.orgpython -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*Source :https://test.pypi.org/project/altf1be_helpersupload the library on PRODpypi.orgpython -m twine upload dist/*Source :https://pypi.org/project/altf1be_helpersDocumentation to build a Python packagePackaging Python Projectshttps://packaging.python.org/tutorials/packaging-projects/Managing Application Dependencieshttps://packaging.python.org/tutorials/managing-dependencies/#managing-dependenciesPackaging and distributing projectshttps://packaging.python.org/guides/distributing-packages-using-setuptools/#distributing-packagesLicenseCopyright (c) ALT-F1 SPRL, Abdelkrim BOUJRAF. All rights reserved.This project IS NOT open sourced BUT the source code is freely availableSee LICENSE in the project root for license information.