Skip to main content

Tiny helper for downloading the “données essentielles” exposed at https://dume.chorus-pro.gouv.fr/#/accueil/donnees-essentielles/rechercher. Everything here reproduces the JSON calls the official SPA makes to https://dume.chorus-pro.gouv.fr/dumes/donneesEssentielles.

Setup

pip install dume-api

Quick start

import dume_api as dume

# Lightweight list view (same fields as the website table).
rows = dume.get_contracts(date="2024-01-11")

# Add filters the same way you would in the UI.
rows = dume.get_contracts(
    date_start="2024-01-01",
    date_end="2024-01-31",
    cpv_code="45210000",
    type_de="Marché public",
)

# Request the complete contract structure (one API call per reference).
contracts = dume.get_contracts(date="2024-01-05", complete=True)

# Single-contract lookup (used internally by the snippet above).
record = dume.get_contract("AIFEDUME-daoxup8c")

That’s it—you rarely need to instantiate anything else. If you do want to manage your own session (different base URL, manual iteration, etc.), instantiate dume_api.DumeApiClient.

Filters & options

Both helper functions accept the same keyword arguments as the website:

Supported filter keywords and their UI equivalents:

Argument UI label Notes
reference / reference_unique Référence fonctionnelle Exact ref such as AIFEDUME-daoxup8c.
date Date de publication Shortcut that sets both start and end to a single day.
date_start / date_end Date de publication (du/au) YYYY-MM-DD strings; use both to define a range.
internal_id Identifiant interne Matches the ID column returned by the API.
nature Nature Use the exact label (Marché, Contrat de concession, …).
procedure Procédure Exact label shown on the site (Procédure adaptée, etc.).
cpv_code Code CPV Full CPV value (e.g. 45210000).
type_de Type de DE Accepts MP, Marché public, CC, or Contrat de concession.
acheteur_id Acheteur / Autorité concédante Provide the SIRET coming from the autocomplete.
titulaire_id Titulaire / Concessionnaire Provide the SIRET coming from the autocomplete.

Behind the scenes

  • The platform caps each query at 100 rows, so get_contracts() automatically splits large date ranges and toggles between MP/CC when needed. If the API still returns 100 results for a tiny filter the helper raises an error so you can narrow it manually.
  • Each HTTP request retries on 429/5xx responses, backing off exponentially. Call dume.configure_client(pause=0.5, max_retries=5) to slow down or override the defaults.

Metadata

Release files for dume-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dume-api 0.1.0
File Size Uploaded
dume_api-0.1.0.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dume-api 0.1.0
File Interpreter ABI Platform
dume_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / dume_api-0.1.0.tar.gz

Download URL dume_api-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ab8aafc2c71072628d81cd7f7f88d6931c0a28c1bc516b3f1b226a6262fa3600
BLAKE2b-256 checksum
How to use checksums
6f33fc5bd88a19485750a918ec0e740af22e71c05c17768b71bb412bcdc043d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release files / dume_api-0.1.0-py3-none-any.whl

Download URL dume_api-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af7ca28e3e5cada9e2d117231b525d248c9747ca230d9da75dc582498a58ceb2
BLAKE2b-256 checksum
How to use checksums
a6b930be11ca6960bd22396d6c630d1b06a30d1544c8d2c7e2c9808ec0593268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page