Skip to main content

Wrapper for python developers to connect to SCA Tork EasyCube API built by www.alt-f1.be

Project description

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

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: alt text

Usage

  1. 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
  1. Install the pyhton packages
pip install -r requirements.txt
  1. load the .env in your entry point (app.py, main.py, test.py)
from dotenv import load_dotenv

load_dotenv()
  1. 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 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

dependencies

Build this package

Documentation to build a Python package

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

altf1be_sca_tork_easycube_api-1.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl (12.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file altf1be_sca_tork_easycube_api-1.1.0.tar.gz.

File metadata

  • Download URL: altf1be_sca_tork_easycube_api-1.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for altf1be_sca_tork_easycube_api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 72bcb908dbfd665c49f8161f5c0d1ff3df7552f020a9e0018b23b74db417ad4d
MD5 94a80c61b897108fd007dc7a81b03cb0
BLAKE2b-256 49d7e7920a7747e2c7fef78f7c8eb8a1c7457d8ab7a1e2a3ae1a562248e24262

See more details on using hashes here.

File details

Details for the file altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for altf1be_sca_tork_easycube_api-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3958af2161a53f90dd417404ed3467edfd27cfb480106bb5c8dace0c3d3b0ba2
MD5 d143ab3c157c22065944d08ef39df52e
BLAKE2b-256 8592212ba066604881aa9a22e1fe2fbdaf1a58c4afe1f60edf8952584cec8d4a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page