Skip to content

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).

License

Notifications You must be signed in to change notification settings

pypamart/dpetools

Repository files navigation

DPE Tools

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).

🌍 Overview

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 pandas DataFrames.
  • Validate business rules via Gherkin-based acceptance tests.

🚀 Quickstart

Prerequisites

  • Python 3.9+
  • uv (package manager for developers)

Installation (for development)

git clone https://github.com/pypamart/dpe-tools.git
cd dpe-tools
uv sync

🧪 Testing

Unit tests

pytest tests/unit

Acceptance tests

Feature files are written in Gherkin v6+ and located under docs/features.

To run acceptance tests:

pytest tests/acceptance

📂 Project Structure

dpe_tools/
└── TODO

🧰 Dev Dependencies

Installed via uv:

  • pytest — for unit testing
  • pytest-bdd — for Gherkin-based BDD testing
  • ruff — linting and code formatting
  • mypy — static type checking

📜 License

This project is licensed under the MIT License. See LICENSE for details.


🤝 Contributing

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
pytest

Don’t forget to write a Gherkin scenario if it fits the use case (docs/features/*.feature).


📫 Contact

Maintained by Pierre-Yves Pamart. Feel free to open an issue or start a discussion!

About

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).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages