Skip to main content

Awattar API

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.

Installing the library locally

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.

Example usage

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())

Development

Installing required pip packages

python pip install -r requirements.txt
pre-commit install -t pre-push

Linting

pylint awattar_api/*.py tests/*.py examples/*.py

Unit testing

pytest tests/*.py

# show logs
pytest -o log_cli=true

# code coverage
pytest --durations=10 --cov-report term-missing --cov=awattar_api tests

Release files for smart-energy.awattar-api 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smart-energy.awattar-api 0.2.0
File Size Uploaded
smart-energy.awattar-api-0.2.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smart-energy.awattar-api 0.2.0
File Interpreter ABI Platform
smart_energy.awattar_api-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / smart-energy.awattar-api-0.2.0.tar.gz

Download URL smart-energy.awattar-api-0.2.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b27f74c539fbd702ba9364094dfffdbd666f8b0909e00e57a3ff34811c3c0088
BLAKE2b-256 checksum
How to use checksums
d1c53cc69a183f928fadfd7f0066adf781de34addf8d7566b76ebcd472efe1fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / smart_energy.awattar_api-0.2.0-py3-none-any.whl

Download URL smart_energy.awattar_api-0.2.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8acad2a5f58914e55a4c6c0306e92383eb315d73860a77ce7b3c2d121793b6eb
BLAKE2b-256 checksum
How to use checksums
00518733aa0a62bf3ff4aa02c45e1bccb961bef734f1b44ebcdeb97bd074e639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page