Python API client for Efergy.
python3 -m pip install pyefergyMore examples can be found in the tests directory.
"""Example usage of pyefergy."""importasynciofrompyefergyimportEfergyTOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"OFFSET="America/New_York"# Accepts either a time zone or literal offsetasyncdefasync_example():
"""Example usage of pyefergy."""api=Efergy(TOKEN, utc_offset=OFFSET)
asyncwithapi:
print(awaitapi.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
masterbranch