Skip to main content

Local-first EMIR/SFTR data quality engine — Python / Arrow bindings

Project description

opendqi (Python / Arrow bindings)

Python bindings to the OpenDQI EMIR/SFTR data-quality engine. Wraps the Rust core in a small PyO3

  • Arrow C Data Interface layer; the engine itself is not reimplemented — every parser, every check, the streaming sink and the canonical record model are reused as-is.

Status

Preview (v0.12.x). See ../../docs/python-roadmap.md for the milestone breakdown. P1 ships the package skeleton (no functions yet) ; P2–P5 add scan_parquet, DqIssue → pyarrow. Table (the v1.0 contract), scan_table(arrow_tbl, mapping), parse_xml, and the result.normalized Arrow output.

Install (when v0.12.0 is released)

# From the GitHub Release tarballs:
pip install https://github.com/PauFou/OpenDQI/releases/download/v0.12.0/opendqi-0.12.0-cp39-abi3-<target>.whl

PyPI publication is gated on a separate explicit-user-ask release. For now the wheels live on the GitHub Releases page.

Local development

# From the repo root, with Python 3.9–3.13 (3.14 supported as a
# runtime target via abi3-py39 but the build script of PyO3 0.22
# needs >= 3.13 — see the spec for details).
python3.12 -m venv crates/opendqi-py/.venv
source crates/opendqi-py/.venv/bin/activate
pip install --upgrade pip maturin pytest pyarrow

cd crates/opendqi-py
maturin develop                # build the cdylib + install in the venv
pytest tests/                  # run the smoke tests
python -c "import opendqi; print(opendqi.__version__)"

Public API (target — surface grows commit-by-commit through P5)

import opendqi

# P2 — path-based scan, summary only.
result = opendqi.emir.scan_parquet("tsr.parquet")
result.summary        # dict — same fields as summary.json

# P3 — DqIssue → pyarrow.Table (v1.0 stable schema, byte-equal to
# the existing issues.csv).
result.issues         # pyarrow.Table | None

# P4 — Arrow-in surface with a canonical-field → user-column mapping.
import pyarrow as pa
table = pa.table({...})
result = opendqi.emir.scan_table(table, mapping={
    "uti":                  "UTI",
    "valuation_timestamp":  "ValuationTimestamp",
})

# P4 (bonus) — parse any of the 12 ISO 20022 messages directly.
records = opendqi.emir.parse_xml("auth107.xml")  # pyarrow.Table

# P5 — optional normalized output (RecordBatch of the canonical model).
result = opendqi.emir.scan_parquet("tsr.parquet", normalize=True)
result.normalized     # pyarrow.Table | None

License

From v0.19.0: FSL-1.1-Apache-2.0 (source-available, converts automatically to Apache-2.0 two years after each release tag) — same licence as the parent OpenDQI repository. See LICENSE.md (kept in sync with the repo-root ../../LICENSE.md by scripts/release-license-bump.sh on every release commit) and ../../COMPETING.md.

Releases v0.1.0 through v0.18.0 on PyPI were shipped under Apache-2.0 and remain so.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

opendqi-0.21.0-cp39-abi3-manylinux_2_28_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

opendqi-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

opendqi-0.21.0-cp39-abi3-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file opendqi-0.21.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for opendqi-0.21.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93d0856eb607dfc6cb0aed047443f01fdf8f8e53ee2bc893731548d090abe1a4
MD5 7c70e1700dc4a776296c7c4e6ed6b595
BLAKE2b-256 0cddc993270dcf8de41e10d3f5a8c77bd27680897c064634e82266ca31511198

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendqi-0.21.0-cp39-abi3-manylinux_2_28_aarch64.whl:

Publisher: python-release.yml on PauFou/OpenDQI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opendqi-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for opendqi-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e29bf9eabbc9ab841797ac3bfccd473fe39c60245a1b551becb473e22a61b6ee
MD5 b2542243854b32bcf0ad28aaa34e1fe8
BLAKE2b-256 ffd461b656457d4c868a5df8e4eda82621f13a67099e5fb66347edb56029ea44

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendqi-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on PauFou/OpenDQI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opendqi-0.21.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for opendqi-0.21.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 194a8ee83fe7e7210431eaf4244d15bf5dba3c739c0bc18e66fa957f7c48ae0e
MD5 4affe2a085c7a2705a5db6e2ab75d8af
BLAKE2b-256 118e1f1c73b1fbe2f5bf67da970067f9df776a4a24c7b0215cbfad7161f1da23

See more details on using hashes here.

Provenance

The following attestation bundles were made for opendqi-0.21.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: python-release.yml on PauFou/OpenDQI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page