Skip to main content

High-performance Python parser for Norma 43 (Cuaderno 43 / AEB 43) Spanish banking files. Open-source, type-hinted, and dependency-free.

Project description

Norma 43 Parser (Python)

License Python Version Code Style PRs Welcome

The definitive, zero-dependency Python library for parsing Spanish banking statements in the Norma 43 (Cuaderno 43 / AEB 43) format.

Designed for fintech developers, accountants, and financial data analysts who need a reliable, high-performance tool to automate bank reconciliation and process financial movements from Spanish banks (CaixaBank, BBVA, Santander, Sabadell, etc.).


🚀 Key Features

  • 🔒 Complete Compliance: rigorous implementation of the AEB (Asociación Española de Banca) specifications for Norma 43.
  • ⚡ High Performance: Optimized for processing large files quickly using only Python's standard library. No external dependencies.
  • 🛠️ Developer Ready: Fully type-hinted (PEP 484) for excellent IDE support and error checking.
  • ✅ Robust Parsing: Handles common edge cases, including complex sign management (debit/credit) and multi-line concepts (Record 23).
  • 📦 Multi-Format Export: Built-in CLI to convert .n43 files to JSON or CSV for easy integration with Excel, Pandas, or DataFrames.

📖 Table of Contents

📥 Installation

Requires Python 3.7+.

Clone the repository and install directly:

git clone https://github.com/enricopesce/norma43.git
cd norma43
pip install .

💻 Quick Start

Easily integrate Norma 43 parsing into your Python financial applications:

from norma43.parser import Norma43Parser

# 1. Initialize the parser
parser = Norma43Parser("path/to/statement.n43")

# 2. Parse the file
accounts = parser.parse()

# 3. Process the data
for account in accounts:
    print(f"🏦 Account: {account['bank']}-{account['branch']}-{account['account_number']}")
    print(f"👤 Owner: {account['owner']}")
    print(f"💰 Balance: {account['final_balance']} {account['currency']}")
    
    for tx in account['transactions']:
        print(f"   📅 {tx['date']} | {tx['amount']:>10} | {tx['description'][0]}")

🖥️ CLI Usage

This library includes a powerful command-line interface (CLI) for quick file inspection and conversion.

1. View Summary (Text)

Ideal for quick verification of file contents.

python -m norma43.parser statement.n43

2. Convert to JSON

Export data for use in web apps or NoSQL databases.

python -m norma43.parser statement.n43 --format json --output data.json

3. Convert to CSV

Generate spreadsheets for Excel or import into Pandas.

python -m norma43.parser statement.n43 --format csv --output report.csv

📊 Data Structure

The parser returns a structured List[Dict] object:

Account Object

Field Type Description
bank str 4-digit Bank Code
branch str 4-digit Branch Code
account_number str 10-digit Account Number
initial_balance Decimal Balance at start period
final_balance Decimal Balance at end period
currency str ISO 4217 Currency Code (e.g., 978 for EUR)

Transaction Object

Field Type Description
date date Transaction date
value_date date Value date (Fecha valor)
amount Decimal Signed transaction amount
description List[str] Full description lines
reference1 str Primary reference / Document ID

📋 Supported Records

Record Type Status Description
11 Header Account identification and initial balance
22 Transaction Main movement details (Date, Amount, IDs)
23 Complementary Extended concepts and descriptions
33 Footer Account final balance and totals verification
88 End of File File integrity check

⚖️ License

Distributed under the Apache License 2.0. See LICENSE for more information.


Keywords: Norma 43, Cuaderno 43, CSB 43, AEB 43, Conciliación Bancaria, Bank Reconciliation, Spanish Banking Standard, Python Parser, Finance, Fintech, Open Banking.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

norma43-0.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

norma43-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file norma43-0.1.1.tar.gz.

File metadata

  • Download URL: norma43-0.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for norma43-0.1.1.tar.gz
Algorithm Hash digest
SHA256 43086b4886285c02e6cdfa67902187b67eb796c338586156c458c2991982ee94
MD5 33cbe6dded663f5566c6338c58552cbd
BLAKE2b-256 03663c5cb97628da600327261aa89d8c65c25c78bd5d2d3b870ca4b02e80c7c6

See more details on using hashes here.

File details

Details for the file norma43-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: norma43-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for norma43-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8926899cd299ea4122de634e8813d4c3dbbb5eec865da5691b5015c2a4808f23
MD5 e9cb0616e29ffd5727a644c990af79c4
BLAKE2b-256 a18b97c3be8c57cf3701722b7b71e09bd0a2a305dea19e27d5f957da5dea84f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page