bank-lint
Validate bank and account details offline — no API calls, no dependencies.
v0.1 supports IBAN (ISO 7064 mod-97 checksum + per-country length across 89 countries). US routing numbers and UK sort codes are coming in later releases.
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_iban("GB82 WEST 1234 5698 7654 32")
# ValidationResult(valid=True, value='GB82WEST12345698765432', error=None)
validate_iban("GB82 WEST 1234 5698 7654 33")
# ValidationResult(valid=False, value='GB82WEST12345698765433', error='INVALID_CHECKSUM')
Spaces and lower-case are handled for you; value is the normalised input.
API
validate_iban(value: str) -> ValidationResult
ValidationResult is a frozen dataclass:
valid: bool
value: str # normalised (spaces removed, upper-cased)
error: str | None # None when valid
error is one of:
"INVALID_FORMAT"— doesn't match the IBAN pattern"INVALID_LENGTH"— wrong length for that country"INVALID_CHECKSUM"— fails the mod-97 check"UNSUPPORTED_COUNTRY"— 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.1.1
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.1.1.tar.gz | 3.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bank_lint-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / bank_lint-0.1.1.tar.gz
| Download URL | bank_lint-0.1.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86c2a3a930708b298af0088e583783c4b99ee15532f80586a94954499d200395
|
|
BLAKE2b-256 checksum How to use checksums |
5674b2b76d1b6ddffcac21ba1112cdcbe12c279f7547c50ad1f5ff2a2a184c5b
|
| 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.1.1-py3-none-any.whl
| Download URL | bank_lint-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
702fc1479661915b59cdea475c43cb847e842ab6de9cc7b73f4ce4b43c0cf947
|
|
BLAKE2b-256 checksum How to use checksums |
44acd1883b3ffa74a40b0865368c63f06b919e4c0b6500b4312c31d51c917d82
|
| 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.1.1
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.