A client library for accessing Enelyzer API
Project description
enelyzer-api-client
A client library for accessing Enelyzer API
Usage
First Authenticate and get your access token:
from enelyzer_api_client.auth import DeviceCodeAuthenticator, ServiceAccountAuthenticator
client_id = ""
client_secret = ""
username = ""
password = ""
environment = "production" # or "staging"
authenticator = ServiceAccountAuthenticator(client_id, client_secret, username, password, environment=environment)
token = authenticator.get_auth_token()
Then, create a client:
from enelyzer_api_client import AuthenticatedClient
base_url_staging="https://client-api.enelyzer.com"
base_url_production="https://client-api.enelyzer.com"
client = AuthenticatedClient(base_url=base_url_staging, token="{token}")
Now call your endpoint and use your models:
from enelyzer_api_client.api.units_categories_and_quantities import get_units
organisation_group = ""
organisation_id = ""
with client as client:
response = get_units.sync(
organisation_group=organisation_group,
organisation_id=organisation_id,
client=client,
)
print(response)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
enelyzer_api_client-0.4.2.tar.gz
(30.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enelyzer_api_client-0.4.2.tar.gz.
File metadata
- Download URL: enelyzer_api_client-0.4.2.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.11 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23601a60657f6d6bc8bd00fa19a28c2e0de30e30a4db2ae393a32211eedc7eb
|
|
| MD5 |
68168adf21b49a3f00f47d15c3a6eb60
|
|
| BLAKE2b-256 |
acb792d87f8d6356e1492d8ce999b64201d1a9a98a1baac34dafb00d1085bbd9
|
File details
Details for the file enelyzer_api_client-0.4.2-py3-none-any.whl.
File metadata
- Download URL: enelyzer_api_client-0.4.2-py3-none-any.whl
- Upload date:
- Size: 90.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.11 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a300ee1a0bcca8d7ef8693089d8272086d56901dec56a14782c366bac650e2c
|
|
| MD5 |
a14789011886b5000fa80e0f20356d43
|
|
| BLAKE2b-256 |
841f43e0ed663e34ff351a53f2027c8a7e529d311a5563a89df6c75a68979f27
|