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.3.0.tar.gz
(27.5 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.3.0.tar.gz.
File metadata
- Download URL: enelyzer_api_client-0.3.0.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5711d69e8e02d1660d6775af9157e0e603377c4588af57c5e4bfeb887cebc8b9
|
|
| MD5 |
9a19db180e62e666461828c88f5efd72
|
|
| BLAKE2b-256 |
b32dcb9bc64103d8c5453039a212b50021e146c578ab4a2dabccd39181a6e65f
|
File details
Details for the file enelyzer_api_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: enelyzer_api_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 74.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
995bd8a3865541c8c7b05541d8911658c80b41e1df24df434795aa9fd58ab713
|
|
| MD5 |
46b87fca53623fb2d54b0b51cb6e7831
|
|
| BLAKE2b-256 |
bf827c2432ad3ed97f2d24953a27b451b9ae02a673d9ace2f8a63d8b9d73edd1
|