Async Python client for the Yuno Energy Heat API (Tridens Monetization)
Project description
pyyunoheat
Async Python client for the Yuno Energy Heat API (formerly Kaizen Energy), a communal heating scheme operating across apartment developments in Ireland.
The API runs on the Tridens Monetization platform. This library handles authentication, entity discovery, and data access with no browser or scraping required.
Installation
pip install pyyunoheat
Quick start
Check your current balance
import asyncio
from yunoheat import YunoHeatClient
async def main():
async with await YunoHeatClient.login("you@example.com", "password") as client:
balance = await client.get_open_bill_due()
print(f"Outstanding balance: €{balance.open_bill_due:.2f}")
asyncio.run(main())
Outstanding balance: €87.83
View this week's meter readings
from datetime import datetime, timedelta, UTC
from yunoheat import YunoHeatClient
async def main():
async with await YunoHeatClient.login("you@example.com", "password") as client:
now = datetime.now(UTC)
events = await client.get_usage_events(
date_from=now - timedelta(days=7),
date_to=now,
)
for e in events.objects:
print(
f"{e.fields.time_of_read_dt:%Y-%m-%d} "
f"{e.quantity:5.1f} kWh "
f"€{e.amount_with_discount:.3f}"
)
asyncio.run(main())
2026-03-14 5.0 kWh €1.306
2026-03-13 4.0 kWh €1.182
2026-03-12 6.0 kWh €1.430
Daily usage report for the current month
from datetime import datetime, UTC
from yunoheat import YunoHeatClient
async def main():
today = datetime.now(UTC)
month_start = today.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
async with await YunoHeatClient.login("you@example.com", "password") as client:
report = await client.get_usage_report(date_from=month_start, date_to=today)
total_kwh = sum(r.kwh for r in report.readings)
total_eur = sum(r.eur for r in report.readings)
print(f"{'Date':<12} {'kWh':>6} {'Cost':>7}")
print("-" * 28)
for r in report.readings:
if r.kwh > 0:
print(f"{r.date:%Y-%m-%d} {r.kwh:6.1f} €{r.eur:6.3f}")
print("-" * 28)
print(f"{'Total':<12} {total_kwh:6.1f} €{total_eur:6.3f}")
asyncio.run(main())
Date kWh Cost
----------------------------
2026-03-01 3.0 € 0.372
2026-03-02 4.0 € 1.182
2026-03-03 5.0 € 1.306
...
2026-03-14 5.0 € 1.306
----------------------------
Total 58.0 €15.834
Re-use saved tokens (skip re-login)
After the first login() call, tokens are saved to ~/.config/yunoheat/tokens.json. On subsequent runs you can load them directly:
from yunoheat import YunoHeatClient, TokenExpiredError
async def main():
try:
# Loads saved tokens; pass credentials for silent re-login on expiry
client = await YunoHeatClient.from_saved_tokens(
username="you@example.com",
password="password",
)
except TokenExpiredError:
# Tokens missing or too old — fall back to full login
client = await YunoHeatClient.login("you@example.com", "password")
async with client:
balance = await client.get_open_bill_due()
print(f"€{balance.open_bill_due:.2f}")
asyncio.run(main())
API reference
YunoHeatClient
| Method | Returns | Description |
|---|---|---|
get_open_bill_due() |
OpenBillDue |
Current outstanding balance (EUR) |
get_usage_events(date_from, date_to, ...) |
UsageEventsResponse |
Paginated meter readings |
get_usage_report(date_from, date_to, interval) |
UsageReport |
Aggregated kWh + EUR by day/week/month |
get_person_customer() |
PersonCustomer |
Account and contact details |
get_invoices(date_from, date_to, ...) |
InvoicesResponse |
Paginated invoices |
get_bill(bill_id) |
Bill |
Single bill by ID |
get_credit_balances() |
CreditBalancesResponse |
Credit balance on account |
get_usage_report accepts interval values: "day" (default), "week", "month", "quarter", "year".
Key model fields
UsageEvent
quantity— kWh consumed in this periodamount_with_discount— EUR costfields.time_of_read_dt— UTC datetime of the readingfields.meter_value_kwh— cumulative meter reading (kWh)
DailyReading (from UsageReport.readings)
date— UTC datetime of the bucket startkwh— kWh consumedeur— EUR cost
Notes
- Tokens are stored at
~/.config/yunoheat/tokens.jsonwith mode0600. Access tokens expire after 30 minutes; the library refreshes them automatically. - All timestamps are UTC. Monetary values are EUR. Energy values are kWh.
- The underlying API is the Tridens Monetization self-care platform at
app.tridenstechnology.com.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyyunoheat-0.1.0.tar.gz.
File metadata
- Download URL: pyyunoheat-0.1.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07e77a277fcb423ad1d6a2984e280d242f891fca3b42614b707ca6d0480b8c81
|
|
| MD5 |
58634287d639b7c6304f3a65d0e29924
|
|
| BLAKE2b-256 |
cd0f87497b4a0fa9725c24788bd7b17ad0ac4ef379c494e8083bf131f7c0b4f7
|
Provenance
The following attestation bundles were made for pyyunoheat-0.1.0.tar.gz:
Publisher:
release.yml on Irishsmurf/pyyunoheat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyyunoheat-0.1.0.tar.gz -
Subject digest:
07e77a277fcb423ad1d6a2984e280d242f891fca3b42614b707ca6d0480b8c81 - Sigstore transparency entry: 1108056681
- Sigstore integration time:
-
Permalink:
Irishsmurf/pyyunoheat@b2f07702154bbd40c23807d7a47291ef8b7d0f60 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Irishsmurf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2f07702154bbd40c23807d7a47291ef8b7d0f60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyyunoheat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyyunoheat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf92b66778c17658c7bcb9f3f45a6f13b66c66cae405dac5401d78cb671023e
|
|
| MD5 |
c82a38de0b1807192b341f4829b850b6
|
|
| BLAKE2b-256 |
76b3e26e7370a3b4f0db1744e541a9d759db3099e277a2947999454247b38e3d
|
Provenance
The following attestation bundles were made for pyyunoheat-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Irishsmurf/pyyunoheat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyyunoheat-0.1.0-py3-none-any.whl -
Subject digest:
fcf92b66778c17658c7bcb9f3f45a6f13b66c66cae405dac5401d78cb671023e - Sigstore transparency entry: 1108056707
- Sigstore integration time:
-
Permalink:
Irishsmurf/pyyunoheat@b2f07702154bbd40c23807d7a47291ef8b7d0f60 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Irishsmurf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2f07702154bbd40c23807d7a47291ef8b7d0f60 -
Trigger Event:
push
-
Statement type: