Skip to main content

a scraper to mirror edi-energy.de

Project description

edi-energy.de scraper

Unittests status badge Coverage status badge Linting status badge Black status badge PyPi Status Badge

The Python package edi_energy_scraper provides easy to use methods to mirror the website edi-energy.de.

Rationale / Why?

If you'd like to be informed about new regulations or data formats being published on edi-energy.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.

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
    |- past (contains archived files)
        |- ahb.pdf
        |- ahb.docx
        |- ...
    |- current (contains files valid as of today)
        |- mig.pdf
        |- mig.docx
        |- ...
    |- future (contains files valid in the future)
        |- allgemeine_festlegungen.pdf
        |- schema.xsd
        |- ...

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

Please follow the instructions in our Python Template Repository . And for further information, see the Tox Repository.

Contribute

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

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

edi_energy_scraper-0.8.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

edi_energy_scraper-0.8.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file edi_energy_scraper-0.8.1.tar.gz.

File metadata

  • Download URL: edi_energy_scraper-0.8.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for edi_energy_scraper-0.8.1.tar.gz
Algorithm Hash digest
SHA256 bb7c1de93b6a7dad49b44695ae26bf577e30378ec8fc0094b51f545c3c7fc522
MD5 f046c766ef3d5737740c408cfed4bad9
BLAKE2b-256 b57c4e3d11e32500cd6699d48a3ecc5e9e5402f3031aa3c3d8fe05c40104027a

See more details on using hashes here.

Provenance

The following attestation bundles were made for edi_energy_scraper-0.8.1.tar.gz:

Publisher: python-publish.yml on Hochfrequenz/edi_energy_scraper

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

File details

Details for the file edi_energy_scraper-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for edi_energy_scraper-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c18aa6b01907b62faec6a6753f71ac5297439f1c41818cbca83856c3d2017e56
MD5 59f004ad007a553d6a59758564c16344
BLAKE2b-256 e7e48b309ccaffb8de6ed68c9e538635049d990267e4778468da0367072a2647

See more details on using hashes here.

Provenance

The following attestation bundles were made for edi_energy_scraper-0.8.1-py3-none-any.whl:

Publisher: python-publish.yml on Hochfrequenz/edi_energy_scraper

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