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.5.1

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.5.1
File Size Uploaded Provenance Actions
panini_parser-0.5.1.tar.gz 75.3 kB Without provenance Details for panini_parser-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 159.8 kB

Release files / panini_parser-0.5.1.tar.gz

Download URL panini_parser-0.5.1.tar.gz
Size 75.3 kB
Tags Source
SHA-256 checksum
How to use checksums
53db69b024575bd5c4ecfb7351af8d2e734545be1a57164cce6083f94d82f566
BLAKE2b-256 checksum
How to use checksums
19b0a66f60464e17c5f420ad344125b011293d0dba8246bf566a03de4c40fdbc
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.5.1-py3-none-any.whl

Download URL panini_parser-0.5.1-py3-none-any.whl
Size 84.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ae03b56097d84d61aecfb9bdd258ce316faf24771ed45b98bca776b1931e12f
BLAKE2b-256 checksum
How to use checksums
9e6bab1f302a32902fcccfa7a9860d76b30d23c590bf770e640cd1f561508e39
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.5.1

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