Python client for GRDF ADICT API
Project description
lowatt-grdf
A command-line tool and Python library to access GrDF Adict API, provided by Lowatt.
Licensing
It is published under the terms of the MIT license.
Installation
pip install lowatt-grdf
Command line usage
$ lowatt-grdf --help
Usage: lowatt-grdf [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
declare-acces
donnees-consos-informatives
donnees-consos-publiees
donnees-contractuelles
donnees-techniques
droits-acces
Each subcommand implement the related API endpoint and output json that can easily be piped to jq for reading.
Also each command will require to supply --client-id and --client-secret, or via corresponding environment variables CLIENT_ID and CLIENT_SECRET. These access are only provided by GRDF.
The droits-acces subcommand has also a --check parameter which will check consent validation:
statut_controle_preuvemust not bePreuve en attenteorPreuve Vérifiée KOetat_droit_accesmust beActive
This command is intended to be used at a daily basis in CI or cron, raising an alert in case of error, because it will require a manual correction.
Python library usage
Here is a sample code to access to the donnees-consos-publiees endpoint:
from lowatt_grdf.api import API
client_id = "ID"
client_secret = "SECRET"
pce = "23000000000000"
grdf = API(client_id, client_secret)
for releve in grdf.donnees_consos_publiees(pce, from_date="2021-01-01", to_date="2021-08-23"):
conso = releve["consommation"]
print(conso["date_debut_consommation"], conso["date_fin_consommation"], conso["energie"])
Contributions
Contribution are welcome through the Github repository.
Feel free to contact for more info by writing at info@lowatt.fr.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lowatt_grdf-2.5.0.tar.gz.
File metadata
- Download URL: lowatt_grdf-2.5.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a8a0628f7d5a74d28c559a8929d244a58075078daab04d87b14e7c649b4426
|
|
| MD5 |
a1dbd4d032779f6589f00ca409d2171e
|
|
| BLAKE2b-256 |
649e199b59423775e6505c5643220df55fa08468116aa136e9b7a075a6a8f78b
|
Provenance
The following attestation bundles were made for lowatt_grdf-2.5.0.tar.gz:
Publisher:
release.yml on lowatt/lowatt-grdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lowatt_grdf-2.5.0.tar.gz -
Subject digest:
a9a8a0628f7d5a74d28c559a8929d244a58075078daab04d87b14e7c649b4426 - Sigstore transparency entry: 200589560
- Sigstore integration time:
-
Permalink:
lowatt/lowatt-grdf@3d67bfd0c3bccf527c99088a61f827dbe6e7bbb6 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/lowatt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d67bfd0c3bccf527c99088a61f827dbe6e7bbb6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lowatt_grdf-2.5.0-py3-none-any.whl.
File metadata
- Download URL: lowatt_grdf-2.5.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00710325cb2e433f0cd76561ded2981eaad6a283940191307b154238d551734
|
|
| MD5 |
db7a3c3cf4042aaaf487f214b6d8c293
|
|
| BLAKE2b-256 |
73fa32fc9c7460956a9b9c9d89d35c729659641ac541377372752d8eeb4eb2af
|
Provenance
The following attestation bundles were made for lowatt_grdf-2.5.0-py3-none-any.whl:
Publisher:
release.yml on lowatt/lowatt-grdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lowatt_grdf-2.5.0-py3-none-any.whl -
Subject digest:
d00710325cb2e433f0cd76561ded2981eaad6a283940191307b154238d551734 - Sigstore transparency entry: 200589565
- Sigstore integration time:
-
Permalink:
lowatt/lowatt-grdf@3d67bfd0c3bccf527c99088a61f827dbe6e7bbb6 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/lowatt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d67bfd0c3bccf527c99088a61f827dbe6e7bbb6 -
Trigger Event:
release
-
Statement type: