hydropeak-opendata
Async Python client for Hydro-Québec's public peak events (pointes hivernales) open data. No account, no login — just the open data feed.
Extracted from the HydroPeak Home Assistant integration.
Data sources
- Peak events feed —
pointeshivernales.json: available offers (canonical, verbatim) and scheduled peak events. - Offer descriptions — the
evenements-de-pointe-offres-disponiblesOpendatasoft dataset (rate limited; intended for occasional use such as setup flows).
Usage
import aiohttp
from hydropeak_opendata import OpenDataClient
async def main():
async with aiohttp.ClientSession() as session:
client = OpenDataClient(session)
offers = await client.get_available_offers()
# ('Credit hivernal Residentiel (CPC-D)', 'Flex Residentiel (TPC-DPC)', ...)
events = await client.get_events(offers[0])
for event in events:
print(event.start, event.end, event.period, event.duration)
Notes:
- Offer identifiers are the strings published in
offresDisponibles, used verbatim. The library applies no transformation;get_events(offer)filters by exact match. - The client sends conditional requests (
If-None-Match) and serves its cached parse on304 Not Modified, so frequent polling is cheap for both sides. Concurrent refreshes are serialized on a lock. - All datetimes from the feed are timezone-aware.
PeakEventsFeed.last_executionis naive (the feed publishes it without an offset). - Errors raise typed exceptions:
OpenDataConnectionError,OpenDataRateLimitError,OpenDataResponseError,OpenDataParseError— all subclasses ofOpenDataError. Failures never silently return empty data.
Development
pip install -e .[dev]
ruff check .
mypy
pytest
License
MIT
Metadata
Release files for hydropeak-opendata 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hydropeak_opendata-0.1.0.tar.gz | 9.3 kB | With provenance | Details for hydropeak_opendata-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hydropeak_opendata-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hydropeak_opendata-0.1.0-py3-none-any.whl |
Total release size: 17.2 kB
Release files / hydropeak_opendata-0.1.0.tar.gz
| Download URL | hydropeak_opendata-0.1.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
607e555d1884c2c41b58ea6cf149b2681fb82f760138acf4bb7d294dd215f45a
|
|
BLAKE2b-256 checksum How to use checksums |
0db008e0a77f22d48b57dd53210bc544d06db819ed5b9d7e2e1fc08e3f4db459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / hydropeak_opendata-0.1.0-py3-none-any.whl
| Download URL | hydropeak_opendata-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ea8d3f318eaffb30e4573bb072944c80dfffa1670b2e00719b6320c80139694
|
|
BLAKE2b-256 checksum How to use checksums |
95f94ff1993cde3cac949cae32348e6716f93beb5b6a97de6f604660c442828e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logSecurity for hydropeak-opendata 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for hydropeak_opendata-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logA 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.