Python client for the Leneda energy data platform
Project description
Leneda API Client
A Python client for interacting with the Leneda energy data platform API.
PLEASE NOTE: As long as the library is in a version below 1.0.0, breaking changes may also be introduced between minor version bumps.
Overview
This client provides a simple interface to the Leneda API, which allows users to:
- Retrieve metering data for specific time ranges
- Get aggregated metering data (hourly, daily, weekly, monthly, or total)
- Create metering data access requests
- Use predefined OBIS code constants for easy reference
Installation
pip install leneda-client
Trying it out
$ export LENEDA_ENERGY_ID='LUXE-xx-yy-1234'
$ export LENEDA_API_KEY='YOUR-API-KEY'
$ python examples/basic_usage.py --metering-point LU0000012345678901234000000000000
Example 1: Getting hourly electricity consumption data for the last 7 days
Retrieved 514 consumption measurements
Unit: kW
Interval length: PT15M
Metering point: LU0000012345678901234000000000000
OBIS code: ObisCode.ELEC_CONSUMPTION_ACTIVE
First 3 measurements:
Time: 2025-04-18T13:30:00+00:00, Value: 0.048 kW, Type: Actual, Version: 2, Calculated: False
Time: 2025-04-18T13:45:00+00:00, Value: 0.08 kW, Type: Actual, Version: 2, Calculated: False
Time: 2025-04-18T14:00:00+00:00, Value: 0.08 kW, Type: Actual, Version: 2, Calculated: False
Example 2: Getting monthly aggregated electricity consumption for 2025
Retrieved 4 monthly aggregations
Unit: kWh
Monthly consumption:
Period: 2024-12 to 2025-01, Value: 30.858 kWh, Calculated: False
Period: 2025-01 to 2025-02, Value: 148.985 kWh, Calculated: False
Period: 2025-02 to 2025-03, Value: 44.619 kWh, Calculated: False
Period: 2025-03 to 2025-04, Value: 29.662 kWh, Calculated: False
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 leneda_client-0.6.0.tar.gz.
File metadata
- Download URL: leneda_client-0.6.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a3c6f409504a6f10e7369b98f139e3d06a47e2cd9dfc9009acd68ced472e2d
|
|
| MD5 |
5dbe659df3520f55549c7d4bc7123d2e
|
|
| BLAKE2b-256 |
266fe13ac108aa8b870a963b8cfab417d62bfb34b3b5037acca30dfe3c0314e3
|
Provenance
The following attestation bundles were made for leneda_client-0.6.0.tar.gz:
Publisher:
python-package.yml on fedus/leneda-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leneda_client-0.6.0.tar.gz -
Subject digest:
53a3c6f409504a6f10e7369b98f139e3d06a47e2cd9dfc9009acd68ced472e2d - Sigstore transparency entry: 245941444
- Sigstore integration time:
-
Permalink:
fedus/leneda-client@81074f9ccba4e4fd9658a26831d42d02f7d38152 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/fedus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@81074f9ccba4e4fd9658a26831d42d02f7d38152 -
Trigger Event:
push
-
Statement type:
File details
Details for the file leneda_client-0.6.0-py3-none-any.whl.
File metadata
- Download URL: leneda_client-0.6.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fc75940a6fc39e71eaa0c27fbb9aa0dabde82db1dbe04bd0eeaeac9a85408e5
|
|
| MD5 |
633e427ee6f2bf657d3959bc0affdcad
|
|
| BLAKE2b-256 |
d5c1890116d0b2c150963d4697534d2e792237ebd429f60aab9a791a886e5784
|
Provenance
The following attestation bundles were made for leneda_client-0.6.0-py3-none-any.whl:
Publisher:
python-package.yml on fedus/leneda-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leneda_client-0.6.0-py3-none-any.whl -
Subject digest:
9fc75940a6fc39e71eaa0c27fbb9aa0dabde82db1dbe04bd0eeaeac9a85408e5 - Sigstore transparency entry: 245941450
- Sigstore integration time:
-
Permalink:
fedus/leneda-client@81074f9ccba4e4fd9658a26831d42d02f7d38152 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/fedus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@81074f9ccba4e4fd9658a26831d42d02f7d38152 -
Trigger Event:
push
-
Statement type: