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:
PANINI_RULES_DIRenv var orrules_dir=Path(...)argument- bundled
panini/rules/package data - 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.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| panini_parser-0.1.0.tar.gz | 25.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| panini_parser-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.5 kB
Release files / panini_parser-0.1.0.tar.gz
| Download URL | panini_parser-0.1.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
138ef7029c256020c8cda1df68f783fa0c0a3082d511ab74217a54f978e8a0da
|
|
BLAKE2b-256 checksum How to use checksums |
92b8e6848bb197cd1d88885ba5163c81f70013ccf0feb0eee95cbc8579310d33
|
| 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.1.0-py3-none-any.whl
| Download URL | panini_parser-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c823ec91b41c6df52d93d4a8b4ac4592ba142ac83bd5dd55485098f6172d560
|
|
BLAKE2b-256 checksum How to use checksums |
7118c97aa10eb4144c35ed2e8c3fe3e064d629498a695cfc0394ec44fed01680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|