Metadata-Version: 2.4
Name: zepben.ewb
Version: 1.0.0b5
Summary: Python SDK for interacting with the Energy Workbench platform
Home-page: https://github.com/zepben/evolve-sdk-python
Author: Kurt Greaves
Author-email: kurt.greaves@zepben.com
License: MPL 2.0
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.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: Operating System :: OS Independent
Requires-Python: >=3.9,<3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: zepben-protobuf==1.0.0b1
Requires-Dist: typing_extensions==4.12.2
Requires-Dist: requests<3.0.0,>=2.26.0
Requires-Dist: urllib3<1.27.0,>=1.26.6
Requires-Dist: PyJWT<2.2.0,>=2.1.0
Requires-Dist: dataclassy==0.6.2
Provides-Extra: test
Requires-Dist: pytest==7.1.2; extra == "test"
Requires-Dist: pytest-cov==2.10.1; extra == "test"
Requires-Dist: pytest-asyncio==0.19.0; extra == "test"
Requires-Dist: pytest-timeout==1.4.2; extra == "test"
Requires-Dist: pytest-subtests; extra == "test"
Requires-Dist: hypothesis==6.56.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: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

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

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

# Requirements #

- Python 3.9 or later

# Installation #

```
pip install zepben.ewb
```

# Building #

```
python setup.py bdist_wheel
```
    
# Usage #

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

# 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())
```
