Skip to main content

Netztransparenz Client

This is a small python client to access the data of the German Netztransparenz portal. It handles authentication, loads the CSV data and transforms it into a pandas dataframe with some optional format changes.

This is an unofficial client, the makers of this library are not affiliated with NETZTRANSPARENZ.DE.

Installation

Install from Pypi with 'pip install netztransparenz"

Example

To use the Netztransparenz API one has to create a free account, see https://api-portal.netztransparenz.de/. With the account you get the credentials that are needed in the next step.

Basic usage

>>> import netztransparenz as nt
>>> client = nt.NetztransparenzClient("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")

#optional: check API status 
>>> client.check_health()
'"OK"'

#load data
>>> df = client.hochrechnung_solar()
>>> df
             Datum    von Zeitzone von    bis Zeitzone bis  50Hertz (MW)  Amprion (MW)  TenneT TSO (MW)  TransnetBW (MW)
0       2011-03-31  22:00          UTC  22:15          UTC          0.00         0.000            0.000            0.000
1       2011-03-31  22:15          UTC  22:30          UTC          0.00         0.000            0.000            0.000
2       2011-03-31  22:30          UTC  22:45          UTC          0.00         0.000            0.000            0.000
...            ...    ...          ...    ...          ...           ...           ...              ...              ...
504046  2025-08-15  09:30          UTC  09:45          UTC       3520.94      7021.757        11195.645         3895.891
504047  2025-08-15  09:45          UTC  10:00          UTC       3597.52      7297.191              NaN         3968.924
504048  2025-08-15  10:00          UTC  10:15          UTC           NaN           NaN              NaN              NaN

Specify timeframe

You can specify the timeframe you want data for:

>>> import datetime
>>> start = datetime.datetime(2024, 1, 1, 0, 0)
>>> end = datetime.datetime(2025, 1, 1, 0, 0)
>>> client.hochrechnung_solar(start, end)
            Datum    von Zeitzone von    bis Zeitzone bis  50Hertz (MW)  Amprion (MW)  TenneT TSO (MW)  TransnetBW (MW)
0      2024-01-01  00:00          UTC  00:15          UTC           0.0           0.0              0.0              0.0
1      2024-01-01  00:15          UTC  00:30          UTC           0.0           0.0              0.0              0.0
2      2024-01-01  00:30          UTC  00:45          UTC           0.0           0.0              0.0              0.0
...           ...    ...          ...    ...          ...           ...           ...              ...              ...
35133  2024-12-31  23:15          UTC  23:30          UTC           0.0           0.0              0.0              0.0
35134  2024-12-31  23:30          UTC  23:45          UTC           0.0           0.0              0.0              0.0
35135  2024-12-31  23:45          UTC  00:00          UTC           0.0           0.0              0.0              0.0

Transform dates

For some of the data sets, dates are split up into five columns which makes them hard to sort. If you set the transform_dates flag to true, they are converted to two timestamps. Also, "von" is turned into the index.

>>> client.hochrechnung_solar(start, end, transform_dates=True)
                                                bis  50Hertz (MW)  Amprion (MW)  TenneT TSO (MW)  TransnetBW (MW)
von                                                                                                              
2024-01-01 00:00:00+00:00 2024-01-01 00:15:00+00:00           0.0           0.0              0.0              0.0
2024-01-01 00:15:00+00:00 2024-01-01 00:30:00+00:00           0.0           0.0              0.0              0.0
2024-01-01 00:30:00+00:00 2024-01-01 00:45:00+00:00           0.0           0.0              0.0              0.0
...                                             ...           ...           ...              ...              ...
2024-12-31 23:15:00+00:00 2024-12-31 23:30:00+00:00           0.0           0.0              0.0              0.0
2024-12-31 23:30:00+00:00 2024-12-31 23:45:00+00:00           0.0           0.0              0.0              0.0
2024-12-31 23:45:00+00:00 2025-01-01 00:00:00+00:00           0.0           0.0              0.0              0.0

Endpoints with variants

The API documents all endpoints in the API portal. Some methods take a parameter for the variant of an endpoint:

  • online_hochrechnung_solar, online_hochrechnung_windonshore and online_hochrechnung_windoffshore take product: "qualitaetsgesichert" (default, hourly, since 2011/2012) or "betrieblich" (quarter-hourly, since 2026-08-31T22:00 UTC). These endpoints require a timeframe.
  • anspruch_verguetung_eeg takes logic: "1hour" (default), "2hour", "3hour", "4hour", "6hour", "15minutes" or "2cent". anspruch_verguetung_kwkg takes "1hour" (default) or "15minutes". Each variant has its own first data, see the docstrings.
>>> client.anspruch_verguetung_eeg(start, end, transform_dates=True, logic="15minutes")

Requests before the first data of an endpoint raise a ValueError, or return an empty dataframe with strict=False.

Metadata

Release files for netztransparenz 0.3.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 netztransparenz 0.3.0
File Size Uploaded Provenance Actions
netztransparenz-0.3.0.tar.gz 26.7 kB Without provenance Details for netztransparenz-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netztransparenz 0.3.0
File Interpreter ABI Platform Actions
netztransparenz-0.3.0-py3-none-any.whl Python 3 none any Details for netztransparenz-0.3.0-py3-none-any.whl

Total release size: 56.1 kB

Release files / netztransparenz-0.3.0.tar.gz

Download URL netztransparenz-0.3.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4004e5344729fa14342dee596e4630490b1e16f328513baa0697a864837579a3
BLAKE2b-256 checksum
How to use checksums
c21cb918dea7bcfcf0930b6950db3396d7e0c519a14209f0b800cef6d91cd058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / netztransparenz-0.3.0-py3-none-any.whl

Download URL netztransparenz-0.3.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5218e2c5dbc64f3b05e471549309533c7faa4541fb08487f487bacbed4ed36df
BLAKE2b-256 checksum
How to use checksums
7104540795dec64a815a9d3d179a5462bea3ef904d305f3c65b2539cb2c93172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for netztransparenz 0.3.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