Metadata-Version: 2.4
Name: zepben.ewb
Version: 1.4.0b1
Summary: Python SDK for interacting with the Energy Workbench platform
Author-email: Kurt Greaves <kurt.greaves@zepben.com>, Max Chesterfield <max.chesterfield@zepben.com>
License-Expression: MPL-2.0
Project-URL: Repository, https://github.com/zepben/evolve-sdk-python
Project-URL: Homepage, https://zepben.com
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: zepben.protobuf==1.4.0
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: requests==2.32.5
Requires-Dist: urllib3==2.5.0
Requires-Dist: PyJWT==2.10.1
Requires-Dist: typing-extensions==4.15.0
Provides-Extra: test
Requires-Dist: pytest==8.4.1; extra == "test"
Requires-Dist: pytest-cov==6.2.1; extra == "test"
Requires-Dist: pytest-asyncio==1.1.0; extra == "test"
Requires-Dist: pytest-timeout==2.4.0; extra == "test"
Requires-Dist: pytest-subtests==0.14.2; extra == "test"
Requires-Dist: hypothesis==6.140.3; extra == "test"
Requires-Dist: grpcio-testing==1.61.3; extra == "test"
Requires-Dist: pylint==2.14.5; extra == "test"
Requires-Dist: six==1.16.0; extra == "test"
Requires-Dist: tox; extra == "test"
Dynamic: license-file

![Build Status](https://img.shields.io/github/actions/workflow/status/zepben/ewb-sdk-python/python-lib-snapshot.yml)
[![codecov](https://codecov.io/gh/zepben/ewb-sdk-python/branch/main/graph/badge.svg?token=B0WNRMMR77)](https://codecov.io/gh/zepben/ewb-sdk-python)python-sdk

# Zepben EWB Python SDK

The Python EWB SDK contains everything necessary to communicate with a Zepben Energy Workbench Server. See the complete [EWB Python SDK Documentation](https://zepben.github.io/evolve/docs/ewb-sdk-python/) for more details.

## Requirements

- Python 3.10 or later

## Installation

```shell
pip install zepben.ewb
```

## Building

```shell
python setup.py bdist_wheel
```

## Usage

See [EWB Python SDK Documentation](https://zepben.github.io/evolve/docs/ewb-sdk-python/).

### Zepben Auth Library

This library provides Authentication mechanisms for Zepben SDKs used with Energy Workbench and other Zepben services.

Typically, this library will be used by the SDKs to plug into connection mechanisms. It is unlikely that end users will
need to use this library directly.

#### Example Usage

```python
from zepben.ewb.client import get_token_fetcher

authenticator = get_token_fetcher(
    issuer="https://login.microsoftonline.com/293784982371c-8797-4168-a5e7-923874928734/v2.0/",
    audience="49875987458e-e217-4c8f-abf6-394875984758",
    client_id="asdaf98798-0584-41c3-b30c-1f9874596da",
    username="",
    password=""
)

authenticator.token_request_data.update({
    'grant_type': 'client_credentials',
    'client_secret': 'W.Tt5KSzX6Q28lksdajflkajsdflkjaslkdjfxx',
    'client_id': 'asdaf98798-0584-41c3-b30c-1f9874596da',
    'scope': '9873498234-e217-4c8f-abf6-9789889987/.default'})

print(authenticator.fetch_token())
```
