Python API client for Efergy.
python3 -m pip install pyefergy
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())
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