API reference¶
The importable Python surface: the loading and summary functions, the
Camt054NotificationSummary dataclass, and Camt054StatementParser,
the BankStatementParser the core discovers through the camt054 and
camt_054 entry points in bankstatementparser.loaders. Generated from
the docstrings by mkdocstrings.
bankstatementparser_loader_camt054.loader
¶
Core ISO 20022 CAMT.054 Debit/Credit Notification Loader.
Camt054NotificationSummary
dataclass
¶
Summary metrics and headers for a CAMT.054 notification message.
Source code in bankstatementparser_loader_camt054/loader.py
36 37 38 39 40 41 42 43 44 45 46 47 | |
Camt054StatementParser
¶
Bases: BankStatementParser
BankStatementParser plugin implementation for ISO 20022 CAMT.054 XML files.
Source code in bankstatementparser_loader_camt054/loader.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
__init__(file_name, **kwargs)
¶
Initialize the CAMT.054 statement parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str | Path
|
Path to the CAMT.054 XML file. |
required |
**kwargs
|
Any
|
Extra options passed to the base parser. |
{}
|
Source code in bankstatementparser_loader_camt054/loader.py
357 358 359 360 361 362 363 364 365 | |
parse()
¶
Parse the CAMT.054 XML file into a pandas DataFrame.
Returns:
| Type | Description |
|---|---|
DataFrame
|
A pandas DataFrame containing standardized statement transactions. |
Source code in bankstatementparser_loader_camt054/loader.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | |
to_transactions()
¶
Parse the CAMT.054 XML file into a list of Transaction models.
Returns:
| Type | Description |
|---|---|
list[Transaction]
|
List of parsed Transaction instances. |
Source code in bankstatementparser_loader_camt054/loader.py
401 402 403 404 405 406 407 | |
get_summary()
¶
Get summary metadata and balance metrics for the CAMT.054 notification file.
Returns:
| Type | Description |
|---|---|
Camt054SummaryRecord
|
Dictionary with statement statistics. |
Source code in bankstatementparser_loader_camt054/loader.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
load_camt054(xml_content)
¶
Parse an ISO 20022 CAMT.054 XML notification payload into Transaction objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_content
|
str | bytes
|
XML string or raw bytes. |
required |
Returns:
| Type | Description |
|---|---|
list[Transaction]
|
List of Transaction instances. |
Source code in bankstatementparser_loader_camt054/loader.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
load_camt054_file(path)
¶
Read and parse a CAMT.054 XML file from disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | PathLike[str]
|
Filesystem path to the XML file. |
required |
Returns:
| Type | Description |
|---|---|
list[Transaction]
|
List of Transaction instances. |
Source code in bankstatementparser_loader_camt054/loader.py
305 306 307 308 309 310 311 312 313 314 315 | |
summarize_camt054(xml_content)
¶
Generate a financial summary of a CAMT.054 notification document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_content
|
str | bytes
|
XML string or raw bytes. |
required |
Returns:
| Type | Description |
|---|---|
Camt054NotificationSummary
|
A Camt054NotificationSummary instance. |
Source code in bankstatementparser_loader_camt054/loader.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |