Simple python wrapper for the Elexon BMRS API.


Keywords
api, energy
License
MIT
Install
pip install pyelexon==0.2.5

Documentation

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