OpenElectricity Python Client
Project description
OpenElectricity Python SDK
A Python SDK for interacting with the OpenElectricity API. This SDK provides both synchronous and asynchronous clients for accessing OpenElectricity data.
Features
- Synchronous and asynchronous API clients
- Type hints for better IDE support
- Automatic request retries and error handling
- Context manager support for proper resource cleanup
- Modern Python (3.12+) with full type annotations
Installation
pip install openelectricity
Quick Start
from openelectricity import Client
# Using environment variable OPENELECTRICITY_API_KEY
with Client() as client:
# API calls will be implemented here
pass
# Or provide API key directly
client = Client(api_key="your-api-key")
For async usage:
from openelectricity import AsyncClient
import asyncio
async def main():
async with AsyncClient() as client:
# API calls will be implemented here
pass
asyncio.run(main())
Documentation
For detailed usage instructions and API reference, see the documentation.
Development
-
Clone the repository
-
Install development dependencies:
make install -
Run tests:
make test
-
Format code:
make format -
Run linters:
make lint
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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 openelectricity-0.1.0.tar.gz.
File metadata
- Download URL: openelectricity-0.1.0.tar.gz
- Upload date:
- Size: 43.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c545526433d2a8e24d1185cb5d06b622a13941ff5aeea8650386a0e7ebcc35a
|
|
| MD5 |
00a1f706f846816b5321e11933ea618e
|
|
| BLAKE2b-256 |
637712152d2e65b7b940f53a38199612c52f50f7933f8c3dee1228f12a5fef68
|
File details
Details for the file openelectricity-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openelectricity-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
403325e7d839874ad50a75a63756353c7d33078b745d91a9a20627998ad4e48d
|
|
| MD5 |
dd73176f24eb107d43b3dfe816c270ba
|
|
| BLAKE2b-256 |
46b39921500432b17fec4e87dfbd2caeb9c79257b56a75c7d57432372e00c73c
|