Requisiti
- Python 3.9-3.14
- Accesso al terminale (macOS, Linux o WSL)
Installazione
pip install bankstatementparser
Per il supporto Polars DataFrame:
pip install bankstatementparser[polars]
Avvio rapido
from bankstatementparser import create_parser, detect_statement_format
fmt = detect_statement_format("transactions.ofx")
parser = create_parser("transactions.ofx", fmt)
df = parser.parse() # pandas DataFrame
print(df.head())
Streaming di file di grandi dimensioni
parser = CamtParser("large_statement.xml")
for transaction in parser.parse_streaming(redact_pii=True):
process(transaction) # La memoria rimane costante
Uso della CLI
python -m bankstatementparser.cli --type camt --input statement.xml