Spaces:
Sleeping
Sleeping
File size: 752 Bytes
d084ead | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """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"}
|