Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrmarble/datadis
Datadis python api client
https://github.com/mrmarble/datadis
api-client datadis electricity python spain
Last synced: 4 days ago
JSON representation
Datadis python api client
- Host: GitHub
- URL: https://github.com/mrmarble/datadis
- Owner: MrMarble
- License: mit
- Created: 2021-08-28T00:05:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T12:44:19.000Z (3 months ago)
- Last Synced: 2024-10-07T20:47:53.541Z (about 1 month ago)
- Topics: api-client, datadis, electricity, python, spain
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 6
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Datadis
Python client for https://datadis.es
![GitHub](https://img.shields.io/github/license/mrmarble/datadis)
[![Semantic Release](https://github.com/MrMarble/datadis/actions/workflows/release.yml/badge.svg)](https://github.com/MrMarble/datadis/actions/workflows/release.yml)
![PyPI - Downloads](https://img.shields.io/pypi/dm/datadis)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=MrMarble_datadis&metric=alert_status)](https://sonarcloud.io/dashboard?id=MrMarble_datadis)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/datadis)## Installation
From [PyPi](https://pypi.org/project/datadis/)
```bash
pip install datadis
```
## Usage/Examples```python
import asyncio
from datadis import get_token, get_suppliestoken = asyncio.run(get_token('username', 'password'))
supplies = asyncio.run(get_supplies(token))
#[
# {
# "address": "home",
# "cups": "1234ABC",
# "postalCode": "1024",
# "province": "madrid",
# "municipality": "madrid",
# "distributor": "Energy",
# "validDateFrom": "2020/09",
# "validDateTo": "2021/09",
# "pointType": 0,
# "distributorCode": "2"
# }
#]
```### Datadis time format
The datadis documentation is a bit sparse regarding the "time" attribute in some of the answers, read this comment from *skgsergio* on the topic https://github.com/MrMarble/datadis/issues/5#issuecomment-1550262886