Skip to main content

panini-py — Python port of Panini

Deterministic, privacy-preserving parser for Indian bank narrations. This package is the Python port of @paniniapi/rules-engine and shares the same grammar JSONs and conformance corpus — both runtimes are tested against the identical fixture set, so parity is enforced, not assumed.

Quick start

from panini import parse_narration

txn = parse_narration("UPI/20261015/DR/826384910234/SWIGGY@okaxis/Cooking/")
# {
#   "channel": "UPI", "type": "DEBIT", "ref_no": "826384910234",
#   "merchant": "Swiggy", "vpa": "okaxis", "vpa_app": "Google Pay",
#   "vpa_bank": "Axis Bank", "category": "Food & Dining", ...
# }

Where the grammars live

The grammar JSONs ship inside the wheel under panini/rules/ — a pip install works standalone with no repo checkout. In a development checkout the engine falls back to packages/rules-engine/rules/; the bundled copy is kept byte-identical and drift is enforced by tests/test_bundled_rules.py. Resolution order:

  1. PANINI_RULES_DIR env var or rules_dir=Path(...) argument
  2. bundled panini/rules/ package data
  3. repo path (packages/rules-engine/rules/) for dev checkouts

Conformance

python3 -m unittest discover tests

runs every fixture in packages/rules-engine/rules/corpus/*.json through the Python engine and asserts the same expect fields the TypeScript corpus gate checks — channel, type, ref_no, counterparty, vpa, merchant/vpa/IFSC enrichment, is_salary, date, category.

Status

Alpha scaffold: narration pipeline (tokenizer → grammar match → normalize → enrich) is at full corpus parity (76/76) and grammar data is bundled for PyPI distribution. SMS media routing and normalizePayload land next.

Metadata

Release files for panini-parser 0.3.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 panini-parser 0.3.0
File Size Uploaded
panini_parser-0.3.0.tar.gz 39.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for panini-parser 0.3.0
File Interpreter ABI Platform
panini_parser-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 87.0 kB

Release files / panini_parser-0.3.0.tar.gz

Download URL panini_parser-0.3.0.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3c5f1498f2176cec8a10d555b5f928ada50931c0fbde4b146b920cbe596c5147
BLAKE2b-256 checksum
How to use checksums
58e57ecef999077e56230f5c4622506e890dba6e38f53dc9e2329b8ee246a4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / panini_parser-0.3.0-py3-none-any.whl

Download URL panini_parser-0.3.0-py3-none-any.whl
Size 47.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d248ca4ccd9d939f7fb385e7badde55714730e08b97a8c80c6f67e21f703cf2
BLAKE2b-256 checksum
How to use checksums
c3615728e6840c05d847ab518c952a2e50831a571c8566b9aeda11e716683e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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