Quickstart
Process a single receipt
from finamt import FinanceAgent
agent = FinanceAgent()
result = agent.process_receipt("invoice.pdf")
if result.success:
data = result.data
print(f"Vendor : {data.counterparty.name if data.counterparty else data.vendor}")
print(f"Date : {data.receipt_date}")
print(f"Currency : {data.currency}")
print(f"Total : {data.total_amount}")
print(f"VAT : {data.vat_amount} ({data.vat_percentage}%)")
else:
print(f"Error: {result.error_message}")
Process an image file
The library accepts PDF and common image formats (JPEG, PNG, TIFF):
result = agent.process_receipt("scan.jpg")
Batch processing
import glob
from finamt import FinanceAgent
agent = FinanceAgent()
for path in glob.glob("receipts/*.pdf"):
result = agent.process_receipt(path)
if result.success:
print(f"{path}: {result.data.total_amount}")
else:
print(f"{path}: FAILED — {result.error_message}")
Web UI
Start the local web interface:
finamt --ui
Then open http://localhost:8000 in your browser. The UI lets you upload
receipts, review and edit extracted data, manage counterparties, and export
reports.
Command-line interface
# Process a single receipt (specify stem without .pdf, and the containing directory)
finamt --file invoice --input-dir /path/to/receipts
# Batch-process all PDFs in a directory
finamt --batch --input-dir /path/to/receipts
# Generate a UStVA pre-return for Q4 2025
finamt --ustva --year 2025 --quarter 4
# Start the web UI without opening a browser tab
finamt --ui --no-browser
# Show all flags
finamt --help