An API library for Efergy energy meters.
Project description
pyefergy
Python API client for Efergy.
Installation
python3 -m pip install pyefergy
Example usage
More examples can be found in the tests
directory.
"""Example usage of pyefergy."""
import asyncio
from pyefergy import Efergy
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
OFFSET = "America/New_York" # Accepts either a time zone or literal offset
async def async_example():
"""Example usage of pyefergy."""
api = Efergy(TOKEN, utc_offset=OFFSET)
async with api:
print(await api.async_get_reading("instant_readings"))
asyncio.get_event_loop().run_until_complete(async_example())
Contribute
All contributions are welcome!
- Fork the repository
- Clone the repository locally and open the devcontainer or use GitHub codespaces
- Install poetry
- Install dependencies:
poetry install
- Do your changes
- Lint the files with
poetry run pylint pyefergy && black . && ruff check && mypy pyefergy
- Ensure all tests pass with
poetry run pytest
- Ensure 100% coverage
- Commit your work, and push it to GitHub
- Create a PR against the
master
branch
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
pyefergy-22.5.0.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file pyefergy-22.5.0.tar.gz
.
File metadata
- Download URL: pyefergy-22.5.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ca1146bb2f34227e6faaae402bda5bf0ee414e49f7549be624d40b999f78c51 |
|
MD5 | 279ae9283e4ce6d97cb94cda48296ebe |
|
BLAKE2b-256 | bd2a89a26da791b94bf0b55c97c73623bf0988adaada85204bb62876c8151f2d |
File details
Details for the file pyefergy-22.5.0-py3-none-any.whl
.
File metadata
- Download URL: pyefergy-22.5.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc776db65363bdee4d005a63b4730f5233c5a2f8ee53b7c54af026ec05cbfaed |
|
MD5 | fc89def5b4af2d4d00c0e57fa5dcf127 |
|
BLAKE2b-256 | ba908656b5775bcfa6a4814a91d8b710324c5b8335f48fe7a31ebb991c9ffbd1 |