Skip to main content

edi-energy.de scraper

License: MIT Unittests status badge Coverage status badge Linting status badge Black status badge PyPi Status Badge Python Versions (officially) supported

The Python package edi_energy_scraper provides easy to use methods to mirror the free documents on bdew-mako.de.

Rationale / Why?

If you'd like to be informed about new regulations or data formats being published on bdew-mako.de you can either

  • visit the site every day and hope that you see the changes if this is your favourite hobby,
  • or automate the task.

This repository helps you with the latter. It allows you to create an up-to-date copy of edi-energy.de on your local computer. Other than if you mirrored the files using wget or curl, you'll get a clean and intuitive directory structure.

From there you can e.g. commit the files into a VCS (like e.g. our edi_energy_mirror), scrape the PDF/Word files for later use...

We're all hoping for the day of true digitization on which this repository will become obsolete.

See also

There is a similar project in C# by Fabian Wetzel: fabsenet/edi-energy-extracto. Other than this project, it stores the downloaded data in a database instead of a file system. It also works with bdew-mako.de.

How to use the Package (as a user)

Install via pip:

pip install edi_energy_scraper

Create a directory in which you'd like to save the mirrored data:

mkdir edi_energy_de

Then import it and start the download:

import asyncio
from edi_energy_scraper import EdiEnergyScraper


# add the following lines to enable debug logging to stdout (CLI)
# import logging
# import sys
# logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

async def mirror():
    scraper = EdiEnergyScraper(path_to_mirror_directory="edi_energy_de")
    await scraper.mirror()


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    asyncio.run(mirror())

This creates a directory structure:

-|-your_script_cwd.py
 |-edi_energy_de
    |- FV2310 (contains files valid since 2023-10-01)
        |- ahb.pdf
        |- ahb.docx
        |- ...
    |- FV2404 (contains files valid since 2024-04-03)
        |- mig.pdf
        |- mig.docx
        |- ...
    |- FV2504 (contains files valid since 2025-06-06)
        |- allgemeine_festlegungen.pdf
        |- schema.xsd
        |- ...

## BDEW Anwendungshilfen / Aktivitätsdiagramme

Some documents (e.g. the BDEW-Anwendungshilfe **Aktivitätsdiagramme** for GPKE, WiM Strom, MPES
and MaBiS) are **not** part of the bdew-mako.de document API — they are published as plain
PDF/DOCX links on bdew.de service pages. `BdewAnwendungshilfenScraper` mirrors those: give it
one or more seed page URLs and it downloads every linked PDF/DOCX into a target directory,
keeping the original filenames.

`AKTIVITAETSDIAGRAMME_SEED_URLS` is a ready-made list of the current public pages (steady-state
GPKE/WiM/MPES/MaBiS **and** the 24h-supplier-switch / ZSG variant, LFW24). The superseded 2020
page and the login-walled Gas document (GeLi Gas 2.0, only reachable behind *BDEW
Authentifizierung*) are intentionally excluded.

```python
import asyncio
from edi_energy_scraper import AKTIVITAETSDIAGRAMME_SEED_URLS, BdewAnwendungshilfenScraper

async def mirror_anwendungshilfen():
    scraper = BdewAnwendungshilfenScraper()
    try:
        await scraper.download_from_seeds(
            list(AKTIVITAETSDIAGRAMME_SEED_URLS), target_directory="aktivitaetsdiagramme"
        )
    finally:
        await scraper.close()

asyncio.run(mirror_anwendungshilfen())

How to use this Repository on Your Machine (for development)

This repository uses uv for dependency management and development tooling. Install uv, then set up the development environment with:

uv sync --group dev

You can run the individual checks via the corresponding dependency groups, e.g.:

uv run --group tests pytest
uv run --group linting ruff check .
uv run --group type_check mypy --show-error-codes --strict src/edi_energy_scraper
uv run --group linting ruff format --check .

For general conventions, please also follow the instructions in our Python Template Repository.

Contribute

You are very welcome to contribute to this template repository by opening a pull request against the main branch.

Metadata

Release files for edi-energy-scraper 2.6.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edi-energy-scraper 2.6.5
File Size Uploaded Provenance Actions
edi_energy_scraper-2.6.5.tar.gz 136.0 kB With provenance Details for edi_energy_scraper-2.6.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for edi-energy-scraper 2.6.5
File Interpreter ABI Platform Actions
edi_energy_scraper-2.6.5-py3-none-any.whl Python 3 none any Details for edi_energy_scraper-2.6.5-py3-none-any.whl

Total release size: 158.3 kB

Release files / edi_energy_scraper-2.6.5.tar.gz

Download URL edi_energy_scraper-2.6.5.tar.gz
Size 136.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fa8500e1d5480fc243c032195c4c1dc896f371176ad2cabacf4dedf990a5a9e8
BLAKE2b-256 checksum
How to use checksums
cc1989c93563f3a41de0b52b8538eb6253d3a649453daa4ccdaf0295435ad2e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / edi_energy_scraper-2.6.5-py3-none-any.whl

Download URL edi_energy_scraper-2.6.5-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3771cc17cf665443662766b5a7465dc98bbbbec823ef6472d55285d686d8aaae
BLAKE2b-256 checksum
How to use checksums
f87985bdde4183ed738f28b84fafec7e2ebd963afc29d774c00e507a05961e8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for edi-energy-scraper 2.6.5

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for edi_energy_scraper-2.6.5.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 Oct 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

2.6.5 This release

2 release files Full provenance

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