DPE Tools — A Python library to query and analyze French DPE (energy performance diagnostics) data for existing housing, using the ADEME public API (since July 2021).
This project provides a convenient Python interface to explore and manipulate the energy performance diagnostics (DPE) data published by ADEME. The dataset covers all existing housing since July 2021 and is accessible through a public API:
🔗 https://data.ademe.fr/datasets/dpe03existant
DPE Tools helps researchers, developers, data scientists, and analysts to:
- Query DPE data by commune, postal code, coordinates, or time window.
- Analyze trends, distributions, and anomalies.
- Transform raw API data into structured, enriched
pandasDataFrames. - Validate business rules via Gherkin-based acceptance tests.
- Python 3.9+
uv(package manager for developers)
git clone https://github.com/pypamart/dpe-tools.git
cd dpe-tools
uv syncpytest tests/unitFeature files are written in Gherkin v6+ and located under docs/features.
To run acceptance tests:
pytest tests/acceptancedpe_tools/
└── TODOInstalled via uv:
pytest— for unit testingpytest-bdd— for Gherkin-based BDD testingruff— linting and code formattingmypy— static type checking
This project is licensed under the MIT License. See LICENSE for details.
Contributions are welcome! Feature requests, bug reports, and pull requests are encouraged.
To get started:
git checkout -b feature/my-feature
# Make your changes
uv sync
pytestDon’t forget to write a Gherkin scenario if it fits the use case (docs/features/*.feature).
Maintained by Pierre-Yves Pamart. Feel free to open an issue or start a discussion!