Generate synthetic EBA reports that satisfy DPM-XL validation rules.
Generate synthetic EBA xBRL-CSV report packages that satisfy a module's DPM-XL validation rules. Give dpm-synth a template with a module's tables, cells and rules; it fills every cell with a plausible value, repairs the values until the rules pass, and writes a report package that reads and validates like a real submission. Use it to test loaders, data warehouses and validators for EBA reports, for any module, without real supervisory data.
dpm-synth is an independent project, not affiliated with or endorsed by the European Banking Authority.
Installation
pip install dpm-synth # Python 3.11+; installs dpm-xl and dpm-xbrl
Quickstart
from dpmxbrl import write_xbrl_csv
from dpmsynth import generate, load_template
template = load_template("minimal.json") # a module's tables, cells and rules
result = generate(template, seed=7)
print(result.passed, "of", result.rules, "rules pass; failing:", result.failed)
write_xbrl_csv(result.report, "report.zip")
2 of 2 rules pass; failing: []
From the command line, with an exit status of 1 if some rules still fail:
$ dpm-synth generate minimal.json -o report.zip --seed 7
rules: 2, passed: 2, failed: 0, not evaluated: 0, not applicable: 0
rounds: 2 (failing rules per round: 1, 0)
wrote report.zip (3 facts)
The sample template minimal.json is in
docs/samples;
templates for real EBA modules are exported from a DPM release by any tool
that writes the
template format.
Features
- Any module: the
dpm-synth-template/1format describes tables, open keys, cells, data types, allowed items and DPM-XL rules. - Rules satisfied: an evaluate-and-repair loop over the rules, with
dpm-xl, repairs sums,
differences, products, sign rules,
isnull,inandmatch. On EBA DPM 4.3 COREP_OF, 999 of the 1,051 rules that apply pass, in 15 rounds; the result names the rest. - Valid packages: written by dpm-xbrl, with a fictional LEI, and read back without broken EBA filing rules other than the file name.
- Reproducible: the same template, seed and versions give the same bytes.
- Large: scaled packages stream open tables with millions of rows.
Toolkit
Part of the dpm toolkit, three Python packages that work together:
| Package | What it does |
|---|---|
| Parse and evaluate DPM-XL validation rules | |
| Read, write and check xBRL-CSV and XBRL-XML reports | |
| Generate test reports that satisfy DPM-XL rules (this package) |
The toolkit tour takes one report through all three: generated with dpm-synth, read with dpm-xbrl, then evaluated and explained with dpm-xl.
Documentation
Documentation: https://luukhopman.github.io/dpm-synth/
- Getting started
- How-to guides: write a template, build one from a DPM release, load-test, reproducible seeds, validate the output with dpm-xbrl and dpm-xl
- Concepts: the evaluate-and-repair loop and its limits
- Reference: the template format, the CLI and the Python API
- For AI agents: llms.txt and llms-full.txt
- Changelog, stability policy and security policy
Development
uv sync
uv run pytest
uv run ruff check
uv run ruff format --check
uv run ty check
uv run python scripts/build_docs.py
See contributing.
Licence
MIT. See LICENSE.
Metadata
Release files for dpm-synth 1.0.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 | Provenance | |
|---|---|---|---|---|
| dpm_synth-1.0.0.tar.gz | 27.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dpm_synth-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.1 kB
Release files / dpm_synth-1.0.0.tar.gz
| Download URL | dpm_synth-1.0.0.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c0f5e8bed351b963cd9da17f713bc407191653deaab674eaa998d07822987a7
|
|
BLAKE2b-256 checksum How to use checksums |
d53524d3938ccfab3ea7b18093839938d4d5d01bb91861a1c56e9536c5d35fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dpm_synth-1.0.0-py3-none-any.whl
| Download URL | dpm_synth-1.0.0-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02c2f9b253d5d5fcd39a4b496a9991ec842ed531c7dc462e4b60c1e8458189c9
|
|
BLAKE2b-256 checksum How to use checksums |
71e6ef85a04a63fca0dfbddacfab65a4e32dd964ab583db806b3150d7b400909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dpm-synth 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.