Skip to main content

Egauge-Async

asyncio APIs for communicating with eGauge meters.

Examples

Get current rates

import asyncio
from egauge_async import EgaugeClient

async def get_current_rates():
    egauge = EgaugeClient("http://egaugehq.d.egauge.net")
    current_readings = egauge.get_current_rates()
    print(current_readings)

asyncio.run(get_current_rates())

Get weekly changes over the last 4 weeks

import asyncio
from egauge_async import EgaugeClient

async def get_weekly_changes():
    egauge = EgaugeClient("http://egaugehq.d.egauge.net")
    weekly_changes = egauge.get_weekly_changes(num_weeks=4)
    print(weekly_changes)

asyncio.run(get_weekly_changes())

Get available registers

import asyncio
from egauge_async import EgaugeClient

async def get_registers():
    egauge = EgaugeClient("http://egaugehq.d.egauge.net")
    instantaneous_registers = egauge.get_instantaneous_registers()j
    print(instantaneous_registers)
    historical_registers = egauge.get_historical_registers()
    print(historical_registers)

asyncio.run(get_historical_registers())

Implementation Details

This package uses the publically-documented XML API provided by eGauge Systems. It also provides support for the newer JSON API with JWT authentication.

Testing

The project includes both unit tests and integration tests:

Running Tests

# Run all unit tests (default)
uv run pytest

# Run with coverage
uv run pytest --cov=egauge_async

# Run integration tests (requires real eGauge device)
export EGAUGE_HOST="egauge12345.local"
export EGAUGE_USERNAME="owner"
export EGAUGE_PASSWORD="your_password"
uv run pytest -m integration

Integration tests validate functionality against a real eGauge device and are automatically skipped if the required environment variables (EGAUGE_HOST, EGAUGE_USERNAME, EGAUGE_PASSWORD) are not set.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by eGauge Systems LLC. Any product names, logos, brands, or other trademarks are the property of their respective trademark holders.

Metadata

Release files for egauge-async 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egauge-async 0.5.0
File Size Uploaded Provenance Actions
egauge_async-0.5.0.tar.gz 98.6 kB Without provenance Details for egauge_async-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for egauge-async 0.5.0
File Interpreter ABI Platform Actions
egauge_async-0.5.0-py3-none-any.whl Python 3 none any Details for egauge_async-0.5.0-py3-none-any.whl

Total release size: 131.4 kB

Release files / egauge_async-0.5.0.tar.gz

Download URL egauge_async-0.5.0.tar.gz
Size 98.6 kB
Tags Source
SHA-256 checksum
How to use checksums
162968d1875f8d282f800a536db3384061524e2c148edef97431ad83a1006780
BLAKE2b-256 checksum
How to use checksums
3a0c09a24dad95d65c9babd828cd2402a2438c6bd176a3e66d5f711406f9f105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / egauge_async-0.5.0-py3-none-any.whl

Download URL egauge_async-0.5.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
debd96ca8cab69f1ba6a1dbb32d1369616174d27a20192ccf0d4657a49a33e56
BLAKE2b-256 checksum
How to use checksums
2cfb50da16d2b61ee42e775c281d69c78e8dfa2fccc4c258278a7323bf17e6d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for egauge-async 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page