Metadata-Version: 2.1
Name: pyelexon
Version: 0.1.1
Summary: 
Home-page: https://github.com/atsangarides/pyelexon
License: MIT
Keywords: api,energy
Author: atsangarides
Author-email: andreas_tsangarides@hotmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: requests (==2.25.1)
Project-URL: Repository, https://github.com/atsangarides/pyelexon
Description-Content-Type: text/markdown

# pyelexon

Simple python wrapper for the Elexon BMRS API.

[![](https://img.shields.io/badge/python-3.8-blue.svg)](https://github.com/pyenv/pyenv)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

## Getting started

* Register on the Elexon BMRS [data portal](https://www.elexonportal.co.uk/news/latest?cachebust=q3pzb5uiac)
and retrieve your `api_key`

* Example usage
```python
from datetime import date
from pyelexon import Elexon

api_key = "123456"
report = "DETSYSPRICES"
settlement_date = date(2021, 9, 15)
settlement_period = 1

elexon = Elexon(api_key)
# returns content of response
r: bytes = elexon.fetch_settlement(report, settlement_date, settlement_period)
```

## Tested reports

* `DETSYSPRICES`
* `PHYBMDATA`
* `DYNBMDATA`

