dpm-xbrl
Read and write EBA-style regulatory XBRL reports in both serializations, xBRL-CSV report packages and XBRL 2.1 XML instances, through one neutral fact model, and find the EBA filing rules a report breaks. It targets reports built on the data point model (DPM) taxonomies of the European Banking Authority and is tested on EBA reports. It is an independent project, not affiliated with or endorsed by the EBA.
Documentation: https://luukhopman.github.io/dpm-xbrl/
pip install dpm-xbrl # standard library only, Python 3.11+
pip install "dpm-xbrl[fast]" # isal: inflates ZIP entries about twice as fast
pip install "dpm-xbrl[frames]" # polars: columnar reading of large reports
Quickstart
from dpmxbrl import read_report
report = read_report("report.zip") # or a directory, report.json, .xbrl, or bytes
print(report.entity_id, report.reference_date, len(report.facts))
for fact in report.facts_for_template("C_28.00"):
print(fact.datapoint, dict(fact.keys), fact.value)
for finding in report.filing: # the EBA filing rules the report breaks
print(finding.severity, finding.rule, finding.code)
SYNTHETICDPMXL000002.CON 2025-12-31 14
dp5488013 {'qINC': 'CP0001'} 67129000
dp5488014 {'qINC': 'CP0001'} 60309000
dp5488013 {'qINC': 'CP0002'} 41250000
dp5488014 {'qINC': 'CP0002'} 38900000
warning File naming invalidFileName
From the command line, stopping a pipeline when the EBA would reject the report:
dpm-xbrl inspect report.zip --fail-on error # exit status 3 on a broken MUST rule
dpm-xbrl convert report.zip instance.xbrl --taxonomy-package taxonomy.zip
The sample report.zip is in
docs/samples.
Features
- One fact model for both formats: frozen
ReportandFactdataclasses, with every value as written and its file and line. - EBA filing rules: each report lists the rules of the EBA Filing Rules v5.8 that the file breaks, with the rule number, tag, severity and locations; with the taxonomy packages also those that need the module, such as reference dates, templates and decimals per data type.
- Millions of facts: the
framesextra reads a 7-million-fact package into polars frames in about a second. - Writing and conversion: deterministic xBRL-CSV packages and XBRL-XML instances that read back as written; with the EBA taxonomy packages, XBRL-XML converts to xBRL-CSV and back, about 3 seconds for a 21,000-fact report.
- Offline: nothing is fetched over the network; xBRL-CSV metadata resolves through local taxonomy packages.
- Safe on untrusted input: resource limits, ZIP and XML hardening, and
one exception type,
ReportError.
Learn more
- Getting started
- How-to guides: read a report, large reports, filing rules and CI, conversion, taxonomy packages, untrusted uploads, validation with dpm-xl
- Concepts and reference, including the Python API and the CLI
- Known gaps and benchmarks
- For AI agents: llms.txt and llms-full.txt
- Changelog, stability policy and security policy
Development
uv sync --all-extras
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. Released under the MIT licence.
Metadata
Release files for dpm-xbrl 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_xbrl-1.0.0.tar.gz | 78.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dpm_xbrl-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 164.9 kB
Release files / dpm_xbrl-1.0.0.tar.gz
| Download URL | dpm_xbrl-1.0.0.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5adadec7d24283b3686bb8e433cb48b53aff3ebe881d6eb5f4dd87d2b9e8352
|
|
BLAKE2b-256 checksum How to use checksums |
f963afd57fa0461d8fc98f27a338acb88e6b01f303f25396a6dab46830c27873
|
| 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_xbrl-1.0.0-py3-none-any.whl
| Download URL | dpm_xbrl-1.0.0-py3-none-any.whl |
|---|---|
| Size | 86.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
121cbfcb799dfde28813bc67b8c7d8ba117ca55f51a71adf95c92b594b4a5eb2
|
|
BLAKE2b-256 checksum How to use checksums |
b78df29c124b3ac8f4da54086e817c7e0d07a5a7702b53718cf0f73d9f95f469
|
| 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-xbrl 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.