Skip to main content

No project description provided

Project description

pyelexon

Simple python wrapper for the Elexon BMRS API.

Code style: black pre-commit

Getting started

  • Register on the Elexon BMRS data portal and retrieve your api_key

  • Example usage

from datetime import date
from pyelexon import Elexon

api_key = "123456"
report = "DETSYSPRICES"
params = {
    "settlement_date": "2021-01-01",
    "settlement_period": 1
}

elexon = Elexon(api_key)
# returns content of response
r: bytes = elexon.fetch_data(report, params)

Example with report specific method

from datetime import date
from pyelexon import Elexon

api_key = "123456"
report = "DETSYSPRICES"


elexon = Elexon(api_key)
# returns content of response
r: bytes = elexon.get_detsysprices(
    report,
    settlement_date=date(2021, 1, 1),
    settlement_period=1
)

Tested reports

  • DETSYSPRICES
  • DYNBMDATA
  • PHYBMDATA

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

pyelexon-0.2.6.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

pyelexon-0.2.6-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

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