Logo Lanfrica

cassymyo-spec/fisc

Domaine:

digital infrastructure

Type de record:

software
Créateur:
cas
Hôte:
Zimbabwe fiscalisation library # FiscGuy **The Modern Python Library for ZIMRA Fiscal Device Integration** FiscGuy gives Django applications a simple, Pythonic interface for every fiscal operation required by the Zimbabwe Revenue Authority — receipt submission, fiscal day management, certificate handling, and more. Built on Django REST Framework, it drops into any Django project in minutes. Installation • Quick Start • API Reference • REST Endpoints • 📚 Full Documentation • Contributing --- ## Features - **Seven core API functions** — `open_day`, `close_day`, `submit_receipt`, `get_status`, `get_configuration`, `get_taxes`, `get_buyer` - **Full fiscal day lifecycle** — open, manage counters, close with ZIMRA-compliant hash and signature - **Receipt types** — Fiscal Invoice, Credit Note, Debit Note with correct counter tracking - **Offline resilience** — receipts queued locally when FDMS is unreachable, synced automatically on reconnect - **Certificate management** — CSR generation, device registration, certificate renewal via `init_device` - **Multi-currency** — USD and ZWG support with per-currency counter tracking - **Multiple payment methods** — Cash, Card, Mobile Wallet, Bank Transfer, Coupon, Credit, Other - **Buyer management** — optional buyer TIN and registration data on receipts - **Cursor pagination** — efficient receipt listing for large datasets - **Typed exceptions** — every error condition has its own exception class - **90%+ test coverage** — mocked ZIMRA and crypto, fast CI --- ## Requirements - Python 3.11, 3.12, or 3.13 - Django 4.2+ - Django REST Framework 3.14+ --- ## Installation ```bash pip install fiscguy ``` ### From source ```bash git clone github.com cd fisc pip install -e ".[dev]" ``` --- ## Quick Start ### 1. Add to Django settings ```python # settings.py INSTALLED_APPS = [ # ... "fiscguy", "rest_framework", ] ``` ### 2. Run migrations ```bash python manage.py migrate ``` ### 3. Initialise your device ``` …

Licenses