Skip to main content

An API library for Efergy energy meters.

Project description

pyefergy

codecov python version PyPI Actions

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!

  1. Fork the repository
  2. Clone the repository locally and open the devcontainer or use GitHub codespaces
  3. Do your changes
  4. Lint the files with make lint
  5. Ensure all tests passes with make test
  6. Ensure 100% coverage with make coverage
  7. Commit your work, and push it to GitHub
  8. Create a PR against the master branch

Project details


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.1.1.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

pyefergy-22.1.1-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page