altf1be_sca_tork_easycube_api
Helpers for SCA Tork Easycube API facilitating the collection of data generated by the dispensers Built by http://www.alt-f1.be.
See https://bitbucket.org/altf1be/com_torkglobal_easycube_fm
- https://easycube.sca-tork.com/en/Plan/Index
- https://fm.easycube.torkglobal.com/en
- https://easycube-external-api-web-c2m2jq5zkw6rc.azurewebsites.net/swagger
Author: Abdelkrim BOUJRAF, http://www.alt-f1.be
Screenshot
cd web; ./run_web.sh- open a browser
http://0.0.0.0:8000/api/dispensers/sca_tork_easycube/
Display actions required per dispenser:
Usage
- Create a .env including this parameter COM_GOOGLE_ANALYTICS_TRACKING_ID
export SCA_TORK_EASYCUBE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SCA_TORK_EASYCUBE_CLIENT_SECRET=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
export SCA_TORK_EASYCUBE_GRANT_TYPE=client_credentials
export SCA_TORK_EASYCUBE_SCOPE=EasyCube.External.Api
export SCA_TORK_EASYCUBE_BASE_URL=https://easycube-external-api-web-c2m2jq5zkw6rc.azurewebsites.net
- Install the pyhton packages
pip install -r requirements.txt
- load the .env in your entry point (app.py, main.py, test.py)
from dotenv import load_dotenv
load_dotenv()
- Run the code and check if the you can access to the REST API
python
import altf1be_sca_tork_easycube_api
print(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']
installation
-
install the package on pypi.org :
- install :
pip install altf1be_sca_tork_easycube_api - upgrade :
pip install altf1be_sca_tork_easycube_api --upgrade
- install :
-
install the package on test.pypi.org :
- install :
pip install -i https://test.pypi.org/simple/altf1be_sca_tork_easycube_api - upgrade :
pip install -i https://test.pypi.org/simple/altf1be_sca_tork_easycube_api --upgrade
- install :
dependencies
- See requirements.txt
Build this package
-
build the setup.py
python3 setup.py sdist bdist_wheelpython3 -m pip install --user --upgrade twine --use-feature=2020-resolver
-
upload the library on TEST pypi.org
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*- Source : https://test.pypi.org/project/altf1be_helpers
-
upload the library on PROD pypi.org
python -m twine upload dist/*- Source : https://pypi.org/project/altf1be_helpers
Documentation to build a Python package
- Packaging Python Projects https://packaging.python.org/tutorials/packaging-projects/
- Managing Application Dependencies https://packaging.python.org/tutorials/managing-dependencies/#managing-dependencies
- Packaging and distributing projects https://packaging.python.org/guides/distributing-packages-using-setuptools/#distributing-packages
License
Copyright (c) ALT-F1 SPRL, Abdelkrim BOUJRAF. All rights reserved.
This project IS NOT open sourced BUT the source code is freely available
See LICENSE in the project root for license information.
Metadata
Release files for altf1be-sca-tork-easycube-api 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| altf1be_sca_tork_easycube_api-1.1.0.tar.gz | 12.0 kB | Without provenance | Details for altf1be_sca_tork_easycube_api-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl |
Total release size: 24.7 kB
Release files / altf1be_sca_tork_easycube_api-1.1.0.tar.gz
| Download URL | altf1be_sca_tork_easycube_api-1.1.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72bcb908dbfd665c49f8161f5c0d1ff3df7552f020a9e0018b23b74db417ad4d
|
|
BLAKE2b-256 checksum How to use checksums |
49d7e7920a7747e2c7fef78f7c8eb8a1c7457d8ab7a1e2a3ae1a562248e24262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Release files / altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl
| Download URL | altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3958af2161a53f90dd417404ed3467edfd27cfb480106bb5c8dace0c3d3b0ba2
|
|
BLAKE2b-256 checksum How to use checksums |
8592212ba066604881aa9a22e1fe2fbdaf1a58c4afe1f60edf8952584cec8d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Security for altf1be-sca-tork-easycube-api 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.