Read your data and your rules.
Bank CSV in. Plain-text rules in. Human-readable and Git-friendly — your finance team can read them, own them, version them. Locale-aware: US, UK, EU, Commonwealth.
Plain-text .fin rules. Same input, same output, every time. Every row of categorised output carries the rule that produced it and the audit reason behind it.
pip install finlangThe four moves a FinLang run makes — the same loop the docs describe, the same loop a regulated workflow expects.
Bank CSV in. Plain-text rules in. Human-readable and Git-friendly — your finance team can read them, own them, version them. Locale-aware: US, UK, EU, Commonwealth.
Rules apply top-to-bottom. Last matching rule sets the category; flags accumulate as the engine moves through the row. No ML, no randomness, no network calls.
Every decision logged with the rule that fired and the matched condition. SHA-256 fingerprints over the immutable fields before and after the engine, compared field-by-field.
Run FinLang against the same raw data your ML system processes. Every disagreement is flagged with the FinLang rule that fired. Your ML pipeline keeps running as-is.
The supporting record — what shipped, what's been verified, what the engine can produce in front of a regulator or model-risk reviewer.
Verify shows the engine didn't corrupt the data. Reconcile gives the categorisation an independent challenge. Audit names the rule behind every decision. The three feed the same evidence chain a regulated workflow expects.
No second engine. No drift. Same deterministic rules, same audit trail — whichever way you reach it. As of v0.7.9, FinLang gives you three ways to plug into your stack.
Runs locally, no network. The original batch-processing path — hard-won enterprise-harness throughput, audit trail by default.
# 1. install from PyPI $ pip install finlang # 2. categorise 5M rows × 50 cols $ finlang \ --input bank.csv \ --rules my_rules.fin \ --output categorised.csv \ --audit audit.json \ --audit-mode full --fastio → read 5,000,000 rows [OK] → apply rules [OK] → write categorised.csv [OK] → audit · full [OK] → time ~3m · ~28K rows/s
Same engine, called from your Python data pipeline. Subprocess-isolated and deterministic — same execution path as the HTTP wrapper.
import subprocess subprocess.run([ "finlang", "--input", "bank.csv", "--rules", "my_rules.fin", "--output", "categorised.csv", "--audit", "audit.json", "--audit-mode", "full", ], check=True)
Runs where your data lives — local machine, your VPC, or controlled internal environment. No hosted endpoint, by design.
$ pip install "finlang[api]" $ finlang-api # starts on 127.0.0.1:8000 $ curl -X POST \ http://127.0.0.1:8000/process \ -F "input_csv=@bank.csv" \ -F "rules=@my_rules.fin"
Real output from finlang --reconcile --reconcile-html against a tampered demo dataset. Self-contained HTML, prints to PDF, archives cleanly.
For finance teams operating ML-driven categorisation pipelines under regulatory scrutiny — banking, insurance, fund administration, wealth management. FinLang sits as an independent challenge layer alongside your existing ML investment, producing rule-attributed disagreement evidence that can support SR 11-7 / EU AI Act-style validation workflows.
For ML teams that need an independent audit alongside categorisation — embed via Python or self-host the API inside your pipeline.
We're inviting a small number of organisations into an Early Access programme where teams can help shape the FinLang DSL and contribute rulepack patterns.
No IP transfer. No revenue sharing. Just early access in exchange for real-world feedback.
Apply for Early Access