A comprehensive Python toolkit for IBAN validation, extraction, generation, formatting, parsing, and BIC lookup.
Project description
IBAN Tools 🏦
⚠️ Coming Soon — This project is under active development.
A comprehensive Python toolkit for IBAN operations including validation, extraction, generation, formatting, parsing, and BIC lookup.
Status
🚧 Development in progress — Not ready for production use yet.
Features (6 Core Functions)
| Function | Description |
|---|---|
extract_ibans_from_text() |
Extract validated IBANs from any text |
extract_ibans_from_pdf() |
Extract validated IBANs from PDF files |
generate_mock_iban() |
Generate random but valid test IBANs |
format_iban() / sanitize_iban() |
Format or clean IBAN strings |
parse_iban() |
Decompose IBAN into structured components |
iban_to_bic() |
Look up SWIFT BIC code from IBAN |
Quick Start
from iban_tools import (
validate_iban,
extract_ibans_from_text,
generate_mock_iban,
format_iban,
sanitize_iban,
parse_iban,
iban_to_bic,
)
# 1. Validate
validate_iban("DE89 3704 0044 0532 0130 00") # True
# 2. Extract from text
text = "Transfer to DE89370400440532013000 or GB29NWBK60161331926819"
extract_ibans_from_text(text)
# ['DE89370400440532013000', 'GB29NWBK60161331926819']
# 3. Generate mock IBANs for testing
generate_mock_iban("TR") # 'TR...' (valid random IBAN)
# 4. Format / Sanitize
format_iban("DE89370400440532013000")
# 'DE89 3704 0044 0532 0130 00'
sanitize_iban("DE89 3704-0044.0532/0130 00")
# 'DE89370400440532013000'
# 5. Parse
parse_iban("DE89370400440532013000")
# {
# 'is_valid': True,
# 'country_code': 'DE',
# 'check_digits': '89',
# 'bank_code': '37040044',
# 'account_number': '0532013000',
# 'bban': '370400440532013000',
# 'country_name': 'Germany'
# }
# 6. IBAN to BIC
iban_to_bic("DE89370400440532013000") # 'COBADEFFXXX'
Installation
# From source
git clone <repository-url>
cd iban-tools
uv sync --all-extras
Tech Stack
- Python 3.13
- uv package manager
- pypdf (PDF extraction)
- pytest (testing)
Supported Countries
BIC Lookup: AT, BE, DE, ES, FR, LU, NL
IBAN Validation & Generation: 76 countries (full ISO 13616 registry)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iban_tools-0.1.0.tar.gz.
File metadata
- Download URL: iban_tools-0.1.0.tar.gz
- Upload date:
- Size: 57.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83883a57962b5ee64b58b61fbb64c51d54a347e6aca47b8055c1324972721322
|
|
| MD5 |
bfb00060ab49c6d272170d46e68e3539
|
|
| BLAKE2b-256 |
9e0a9e7e0bc84386c44f1c7bef7c17faa5c8e89a79ea4fe114da2b4c8d30f0b6
|
File details
Details for the file iban_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iban_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ae372ee5f02c1063d701b406204715a7b8805c46e80d5e7c962c6fe3c6bf163
|
|
| MD5 |
1f1c238b0292dd5a8fcc387dd112c05e
|
|
| BLAKE2b-256 |
466ce4fd8eccf58187fa7356405a28253eef029ad2bb9384b681611c86b7e31c
|