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.4.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.4.0
File Size Uploaded Provenance Actions
panini_parser-0.4.0.tar.gz 70.5 kB Without provenance Details for panini_parser-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 151.5 kB

Release files / panini_parser-0.4.0.tar.gz

Download URL panini_parser-0.4.0.tar.gz
Size 70.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cf4f82c10dd7dcb3ea0879f30e5f00733be34a00d1a2d40b4dcecb3948b5d7f2
BLAKE2b-256 checksum
How to use checksums
f7b362f147105e1ff451a6350e41f6a1ebe1f3f5a2a130f580716aa307e28321
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.4.0-py3-none-any.whl

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

Security for panini-parser 0.4.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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