v3.3.1 • api

Complete reference for all public modules and functions in ParsiKit:

ParsiKit API Reference (English) #

Complete reference for all public modules and functions in ParsiKit:

Module Description Documentation
parsikit.text Character standardization, ZWNJ, diacritics stripping, entity extraction, and masking Text Reference
parsikit.validators National Code, mobile, landline, card, Sheba, bill, and plate validators Validators Reference
parsikit.models Rich domain models for identity and financial types (with Pydantic support) Models Reference
parsikit.datetime Jalali-Gregorian conversions, leap years, month names, and relative time Datetime Reference
parsikit.number & parsikit.currency Numeral script conversions, words-to-numbers, Rial/Toman, VAT, installments Numbers & Currency
parsikit.dev & parsikit.gui Visual width alignment, terminal diagnostics, and live typing helpers Dev & GUI Reference
parsikit.reshaper Persian cursive letter reshaping and Bidirectional reordering for graphics Reshaper Reference
parsikit.cache High-performance thread-safe LRU-like caching infrastructure Cache Reference
parsikit.config & parsikit.exceptions Global configuration and structured exception classes Config & Exceptions

Configuration & Exceptions #

Configuration (parsikit.config) #

  • default_tax_rate: float: Default VAT rate (default: 0.10).
  • default_currency: str: System currency default, "toman" or "rial" (default: "toman").
  • enable_cache: bool: Thread-safe LRU caching toggle for number-to-words conversions (default: True).

Exceptions (parsikit.exceptions) #

All custom exceptions inherit from ParsiKitError and ValidationError (subclass of ValueError):

  • InvalidNationalCodeError
  • InvalidMobileError
  • InvalidCardNumberError
  • InvalidShebaError
  • InvalidPostalCodeError
  • InvalidPlateError
  • InvalidBillError