Skip to main content

rwa-filer

Validate regulatory returns against the published supervisory rules and write them in the format the regulator accepts.

It carries the Bank of England's validation rules for banking taxonomy v4.1.1 and evaluates them as the Bank's gateway does, for 14 reporting modules (PRA001, PRA116, Capital+, leverage, MREL and financial statements). That includes the Bank's validations deny list: the rules its gateway has stopped running, or runs only as warnings, since the taxonomy was published (rwa-filer rulebook deny-list). It also carries a register of the published rules known to be wrong, with the evidence for each, and labels every result one of them explains without changing the verdict (rwa-filer rulebook issues; --format markdown renders the write-up to share with the Bank).

Documentation: https://openafterhours.github.io/rwa_calculator/rwa-filer/

rwa-filer is a standalone package. It lives in the rwa_calculator repository as a uv workspace member and is released separately from rwa-calc: it depends on Polars and, for its dashboard, a small web stack (Starlette, uvicorn, Jinja2), and never imports rwa_calc. rwa-calc uses it to validate the returns it generates; any other system that can produce template-level figures can use it the same way.

Run it with uv, naming @latest:

uvx rwa-filer@latest --help

@latest makes each run check PyPI and use the newest release, so a return is always checked with the newest rules and taxonomy rwa-filer carries. Without it, uvx may run a copy it already has: one it fetched recently, or one installed with uv tool install, for as long as that stays installed. Extras go in quotes, so the shell leaves the brackets alone: a command that reads or writes a workbook runs as uvx "rwa-filer[excel]@latest" ....

The manifest build writes records the version that wrote it. To repeat a run on that version, name it in place of latest: uvx rwa-filer@0.1.0 ....

# As a library in a uv project (then run the command as `uv run rwa-filer`).
# The lock file holds it at one version; `uv lock --upgrade-package rwa-filer`
# moves it to the newest release
uv add rwa-filer

# As a command on your PATH, for a machine that has to run it offline. It
# stays on the version installed until you upgrade it
uv tool install rwa-filer
uv tool upgrade rwa-filer
# The dashboard: open a return in the browser and walk from the verdict to the
# broken rules to the cells on the template grid that broke them
uvx rwa-filer@latest dash return.xbrl
# Check a return: structure against the taxonomy, then the published rules
uvx rwa-filer@latest validate return.parquet \
    --entity 5493001KJTIIGC8Y1R12 --reference-date 2027-03-31 --module PRA001

# The same, at the accuracy the file will be written with, and with the evidence
# behind the verdict: every rule outcome, evaluation and comparison, as JSON Lines
uvx rwa-filer@latest validate return.parquet --monetary-decimals 0 \
    --evidence evidence.jsonl.gz --require-complete \
    --entity 5493001KJTIIGC8Y1R12 --reference-date 2027-03-31 --module PRA001

# Review warnings above a currency or basis-point threshold and hide zero-only
# must-be-empty occurrences. The JSON report includes all failures.
rwa-filer validate return.xbrl --warning-materiality 10 --warning-materiality-bps 1 \
    --hide-zero-null-errors --report full-report.json

# Show only errors in the working list and any requested breakdown.
rwa-filer validate return.xbrl --errors-only

# Validate it and write the XBRL submission file, with a manifest
uvx rwa-filer@latest build return.parquet --out filing/ \
    --entity 5493001KJTIIGC8Y1R12 --reference-date 2027-03-31 --module PRA001

# Record an approval against the file's checksum, and check it before upload
uvx rwa-filer@latest signoff filing/<name>.manifest.json --approver "C. Approver" --role "Head of Reporting"
uvx rwa-filer@latest verify filing/<name>.manifest.json

# What changed since the version already filed
uvx rwa-filer@latest diff filed.xbrl resubmission.xbrl

# A second opinion: have the Arelle XBRL processor check the written file
# against the Bank's taxonomy package, and compare its verdict on every rule
# with this package's own (needs the Bank's package)
uvx "rwa-filer[arelle]@latest" referee filing/<name>.xbrl --taxonomy-package boe-banking-v411.zip

# A blank workbook in the template layout, to fill in and validate
uvx "rwa-filer[excel]@latest" template --module PRA001 --reference-date 2027-03-31 --out return.xlsx

uvx rwa-filer@latest --help

A return is a table with one row per reported cell (table, sheet, open_key, row, column, value), read from Parquet or CSV, or an Excel workbook in the template layout (needs rwa-filer[excel]), or an XBRL instance written by any system.

The regulator's own validation on upload is authoritative. A clean result from rwa-filer is evidence a return is well-formed, not a guarantee that it will be accepted.

See CHANGELOG.md for release notes.

Metadata

Release files for rwa-filer 0.1.11

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

Source distribution (sdist)

Source distribution for rwa-filer 0.1.11
File Size Uploaded Provenance Actions
rwa_filer-0.1.11.tar.gz 2.9 MB With provenance Details for rwa_filer-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rwa-filer 0.1.11
File Interpreter ABI Platform Actions
rwa_filer-0.1.11-py3-none-any.whl Python 3 none any Details for rwa_filer-0.1.11-py3-none-any.whl

Total release size: 5.3 MB

Release files / rwa_filer-0.1.11.tar.gz

Download URL rwa_filer-0.1.11.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ad2b3ff03be95b1b03b66e532413e3a9fc102882bd454954c387cdb13f491dd3
BLAKE2b-256 checksum
How to use checksums
56d1e4958c3c2c902dc6d121c36b3a97844dda38155ca8485bedb729ccef4376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / rwa_filer-0.1.11-py3-none-any.whl

Download URL rwa_filer-0.1.11-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8cf00481b89aec4cf1df729775b5e6873449af4210e27e51319690363a933e0e
BLAKE2b-256 checksum
How to use checksums
394c386336a6a38f018e9addc40526c002825cf0b8940be91d515e29c959ef8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for rwa-filer 0.1.11

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rwa_filer-0.1.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

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