Metadata-Version: 2.4
Name: enelyzer-api-client
Version: 0.4.0
Summary: A client library for accessing Enelyzer API
License-File: LICENSE
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: attrs (>=22.2.0)
Requires-Dist: httpx (>=0.23.0,<0.29.0)
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
Description-Content-Type: text/markdown

# enelyzer-api-client
A client library for accessing Enelyzer API

## Usage

First Authenticate and get your access token:

```python

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:

```python
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:

```python
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)
```
