bank-lint
Validate bank and account details offline — no API calls, no dependencies.
Supports IBAN (ISO 7064 mod-97, 89 countries) and US ABA routing numbers. UK sort codes are coming in a later release.
Part of a dual-language project: the same validation logic, verified against the
same test vectors, is also available for JavaScript/TypeScript as
bank-lint on npm.
Install
pip install bank-lint
Usage
from bank_lint import validate_iban, validate_us_routing
validate_iban("GB82 WEST 1234 5698 7654 32")
# ValidationResult(valid=True, value='GB82WEST12345698765432', error=None)
validate_us_routing("021000021")
# ValidationResult(valid=True, value='021000021', error=None)
Spaces and lower-case are handled for you; value is the normalised input.
API
validate_iban(value: str) -> ValidationResult
ISO 7064 mod-97 checksum plus per-country length.
validate_us_routing(value: str) -> ValidationResult
9-digit ABA routing number: prefix range + weighted checksum. Spaces and hyphens are stripped.
ValidationResult is a frozen dataclass:
valid: bool
value: str # normalised (spaces/hyphens removed)
error: str | None # None when valid
error is one of:
"INVALID_FORMAT"— pattern or ABA prefix fails"INVALID_LENGTH"— wrong length"INVALID_CHECKSUM"— fails the checksum"UNSUPPORTED_COUNTRY"— IBAN country code not in the registry
Scope
bank-lint checks the structural validity of a bank identifier — format, length, and checksum. It does not:
- confirm the account actually exists or is open,
- do name matching or Confirmation of Payee,
- look up bank or branch details.
Country IBAN lengths are sourced from the official SWIFT IBAN Registry.
License
MIT
Metadata
Release files for bank-lint 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bank_lint-0.2.0.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bank_lint-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / bank_lint-0.2.0.tar.gz
| Download URL | bank_lint-0.2.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93bb2e9abb6a9f229f1294167c47ba6e323ee35fda3a0a5bc5cc314985a9aa61
|
|
BLAKE2b-256 checksum How to use checksums |
ced32a5ec51a15a83212d50f0686f1b38d9adfd3a99056076039a5b109021b03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / bank_lint-0.2.0-py3-none-any.whl
| Download URL | bank_lint-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d264f20d6ef7863ca08ae2a6e45d261c7a73d9e968ebf43f9a88d761eeec450
|
|
BLAKE2b-256 checksum How to use checksums |
859e3f68a60171f89cd5362afed410d3ca9c1731358555a9e0ef850c9590a853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for bank-lint 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.