Skip to main content

dpm-xl

dpm-xl

A Python parser and evaluator for DPM-XL, the expression language of EBA validation rules and similar checks. Give it a rule and your report data; it tells you which records fail and explains each failure in plain numbers:

1,204 should equal 1,211 (1,180 + 31): difference 7, at least 5.5 given the reported precision

Documentation: https://luukhopman.github.io/dpm-xl/

  • Parses every construct of the DPM-XL grammar, including every EBA validation rule and precondition of DPM releases 3.4–4.4 (14,000+ distinct expressions, about 0.1 ms each).
  • Evaluates them with EBA's interval arithmetic, null logic and key joins, and points each failure at the cells involved.
  • Has no dependencies. The optional columnar extra adds a polars evaluator for reports with millions of open-table rows.
  • Reads no files and knows no DPM release: data comes through a three-method provider, so the same evaluator runs against a report upload, a database or test fixtures. dpm-xbrl reads xBRL-CSV and XBRL-XML reports.

dpm-xl is an independent project, not affiliated with or endorsed by the European Banking Authority.

Installation

pip install dpm-xl               # Python 3.11+, no dependencies
pip install "dpm-xl[columnar]"   # adds the polars evaluator

Quickstart

from dpmxl import MemoryProvider, Number, TableLayout, evaluate_rule, explain

layout = TableLayout("C_01.00", rows=("0010", "0020", "0030"), columns=("0010", "0020"))
values = {  # (table, row, column, sheet, open keys) -> value with XBRL decimals
    ("C_01.00", "0010", "0010", None, ()): Number.of(100, 0),
    ("C_01.00", "0020", "0010", None, ()): Number.of(60, 0),
    ("C_01.00", "0030", "0010", None, ()): Number.of(40, 0),
    ("C_01.00", "0010", "0020", None, ()): Number.of(1204, 0),
    ("C_01.00", "0020", "0020", None, ()): Number.of(1180, 0),
    ("C_01.00", "0030", "0020", None, ()): Number.of(31, 0),
}
provider = MemoryProvider([layout], values)

expression = (
    "with {tC_01.00, c*, default: 0, interval: true}: {r0010} = {r0020} + {r0030}"
)
result = evaluate_rule(expression, provider, precondition="{v_C_01.00}")

print(result.status, result.counts)
for outcome in result.failures:
    print(outcome.key, explain(result.evaluation, expression, outcome.key).summary)
failed {'passed': 1, 'failed': 1, 'null': 0}
{'c': '0020'} 1,204 should equal 1,211 (1,180 + 31): difference 7, at least 5.5 given the reported precision

On the command line, against a JSON data file:

dpm-xl check rules.json            # parse every expression and precondition
dpm-xl eval rules.json data.json   # evaluate and explain every rule

Documentation

Licence

MIT. See LICENSE.

Metadata

Release files for dpm-xl 1.0.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 dpm-xl 1.0.0
File Size Uploaded Provenance
dpm_xl-1.0.0.tar.gz 95.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dpm-xl 1.0.0
File Interpreter ABI Platform
dpm_xl-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 196.6 kB

Release files / dpm_xl-1.0.0.tar.gz

Download URL dpm_xl-1.0.0.tar.gz
Size 95.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a54e5b14492685b8a85a53cefb606a36394404bc5e9f80bae14fb687f97933a0
BLAKE2b-256 checksum
How to use checksums
db782a243d708faa286a3a60795409c6ba652e8b35e41b5eb02c2d750fbddd96
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_xl-1.0.0-py3-none-any.whl

Download URL dpm_xl-1.0.0-py3-none-any.whl
Size 101.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d6b8d66614076e019c7949cea08fadb42008ffd0e5f0c5cc32daccab831f2f5
BLAKE2b-256 checksum
How to use checksums
2093db40f4da35e2320bd70eb175e18170b738908fc12d20f1a0535cacd02c42
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-xl 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.

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