Spaces:
Sleeping
Sleeping
Download shared/constants.py from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/shared/constants.py
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/shared/constants.py
-
curl -L -o constants.py https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/shared/constants.py
752 Bytes
| """Shared enums and constants for BeFree packages.""" | |
| from __future__ import annotations | |
| from decimal import Decimal, getcontext | |
| from enum import Enum | |
| # Set high precision for Decimal arithmetic throughout the project. | |
| getcontext().prec = 28 | |
| class TxType(str, Enum): | |
| DEBIT = "debit" | |
| CREDIT = "credit" | |
| TRANSFER = "transfer" | |
| FEE = "fee" | |
| UNKNOWN = "unknown" | |
| class AuditStatus(str, Enum): | |
| CLEAN = "clean" | |
| WARNING = "warning" | |
| ERROR = "error" | |
| # Audit constants | |
| BALANCE_TOLERANCE: Decimal = Decimal("0.01") # cents tolerance for audit | |
| MIN_CONFIDENCE_THRESHOLD: float = 0.60 | |
| # Schema version for Excel output | |
| SCHEMA_VERSION: str = "1.0.0" | |
| SUPPORTED_SCHEMA_VERSIONS: set[str] = {"1.0.0"} | |