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.
Metadata
Release files for lowatt-grdf 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lowatt_grdf-2.5.0.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lowatt_grdf-2.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.8 kB
Release files / lowatt_grdf-2.5.0.tar.gz
| Download URL | lowatt_grdf-2.5.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9a8a0628f7d5a74d28c559a8929d244a58075078daab04d87b14e7c649b4426
|
|
BLAKE2b-256 checksum How to use checksums |
649e199b59423775e6505c5643220df55fa08468116aa136e9b7a075a6a8f78b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2025.
Transparency logRelease files / lowatt_grdf-2.5.0-py3-none-any.whl
| Download URL | lowatt_grdf-2.5.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d00710325cb2e433f0cd76561ded2981eaad6a283940191307b154238d551734
|
|
BLAKE2b-256 checksum How to use checksums |
73fa32fc9c7460956a9b9c9d89d35c729659641ac541377372752d8eeb4eb2af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2025.
Transparency log