datagouv-toolkit
Outils génériques pour explorer, télécharger, inspecter et analyser des jeux de données publiés sur data.gouv.fr.
Réutilisations
Architecture
datagouv.py: exploration et résolution de datasets data.gouv.fr.download_resources.py: téléchargement générique de ressources.dataset_workflow.py: enchaînement résolution → téléchargement → audit CSV.inspect_csv.py: audit structurel générique d'un CSV.catalog_stats.py: statistiques reproductibles à partir d'un snapshot du catalogue.normalize.py: normalisation des métadonnées.tests/: tests unitaires.datasets/: pipelines spécifiques à certains jeux de données.datasets/baac/: premier cas d'usage, données BAAC.
Exemples
Rechercher un dataset
python datagouv.py search "accidents corporels"
Inspecter ses ressources
python datagouv.py resources \
"accidents corporels" \
--producer "Ministère de l'intérieur"
Télécharger une ressource
python download_resources.py \
"accidents corporels" \
--producer "Ministère de l'intérieur" \
--format csv \
--resource-title "Caract_2024" \
--output data
Télécharger et auditer automatiquement
python dataset_workflow.py \
"accidents corporels" \
--producer "Ministère de l'intérieur" \
--format csv \
--resource-title "Caract_2024" \
--output data
Auditer un CSV local
python inspect_csv.py fichier.csv
Pour rediriger un audit volumineux :
python inspect_csv.py fichier.csv > audit.txt
Analyser un snapshot du catalogue
python catalog_stats.py "transport" \
--snapshot snapshot/2026-08-25
Filtres disponibles notamment :
python catalog_stats.py "énergie" \
--snapshot snapshot/2026-08-25 \
--license fr-lo-2.0 \
--frequency annual
Qualité
ruff check .
mypy .
pytest -q
bandit -q *.py
Metadata
Release files for datagouv-toolkit 0.2.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 | |
|---|---|---|---|
| datagouv_toolkit-0.2.0.tar.gz | 39.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datagouv_toolkit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.2 kB
Release files / datagouv_toolkit-0.2.0.tar.gz
| Download URL | datagouv_toolkit-0.2.0.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
016e9fbfbef0a6614a3597e18d4fa1a1dad079fa9ae4665ae9bfba311eb33ad1
|
|
BLAKE2b-256 checksum How to use checksums |
53e53e33376d27ab472276307808cce16b5ff84705e523a15ad70da2ca39c71d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 26, 2026.
Transparency logRelease files / datagouv_toolkit-0.2.0-py3-none-any.whl
| Download URL | datagouv_toolkit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2cb64d6ac267b2d8e8585695929df6a4ceb0cac0e0a75aa6db777928d34af4c9
|
|
BLAKE2b-256 checksum How to use checksums |
811e55f0478cf9210d20e6e75cc4b6c504324a88446c2c3a4989db0eb3f34e8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 26, 2026.
Transparency log