Skip to main content

Python client for the Leneda energy data platform

Project description

Leneda API Client

PyPI version Python Versions License

A Python client for interacting with the Leneda energy data platform API.

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

leneda_client-0.4.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leneda_client-0.4.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file leneda_client-0.4.0.tar.gz.

File metadata

  • Download URL: leneda_client-0.4.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for leneda_client-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7aa4a3ef3a712bdab0e5cf54dea0b87ca554351a9d6abadaf1d40ed591ccd3da
MD5 3bbae38a097062de8534a38d58c268bb
BLAKE2b-256 df8e5b165fffb7582157d52fcae822103ae1b49ac33e88d350cd5ab08ece668b

See more details on using hashes here.

Provenance

The following attestation bundles were made for leneda_client-0.4.0.tar.gz:

Publisher: python-package.yml on fedus/leneda-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leneda_client-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: leneda_client-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for leneda_client-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9aecbd830a595f415ac2b75531e5b43d8ae2e57ebfc1950044d4d2eafd7447e
MD5 fc58a46f6aca2b91a861c0a5173fe277
BLAKE2b-256 05e0ba8e9f4bd4a133a60d7ca8c42820456be23c5287ab24acb0433f3c171143

See more details on using hashes here.

Provenance

The following attestation bundles were made for leneda_client-0.4.0-py3-none-any.whl:

Publisher: python-package.yml on fedus/leneda-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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