A python library to access the Awattar Api. Refer also to the Awattar Energy Price API. This repo provides functionality for:
- Getting Energy Price forecast information.
Python 3 is recommended for this project.
python -m pip install -e .
This is needed for the first time when working with the library/examples/tests.
ENERGY_DATA_API_URL="https://api.awattar.de" python3 examples/simple.py
or
from awattar_api.awattar_api import AwattarApi
awattar_api = AwattarApi('provide_api_url')
# or you can define additional optional parameters
# awattar_api = AwattarApi('provide_api_url', timeout=10)
print(awattar_api.get_electricity_price())
python pip install -r requirements.txt
pre-commit install -t pre-push
pylint awattar_api/*.py tests/*.py examples/*.py
pytest tests/*.py
# show logs
pytest -o log_cli=true
# code coverage
pytest --durations=10 --cov-report term-missing --cov=awattar_api tests