Registry / serialization / clabe
library2.1.10pypypi✓ verified 84d ago

Validate and generate the control digit of a CLABE (Clave Bancaria Estandarizada) in Mexico. Current version: 2.1.10, requires Python >=3.8. Active development with monthly releases.

pip install clabe
INSTALL
IMPORT
SIG · CLABE
C
clabe
serializationpythonv2.1.10
Install
3.2s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.10 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Clabe
from clabe import Clabe
from clabe import clabe
validate_clabe
from clabe import validate_clabe
generate_new_clabes
from clabe import generate_new_clabes

Validate a CLABE string, generate a check digit, or fetch bank list.

from clabe import clabe # Validate a CLABE result = clabe('032180000118359719') print(result.valid) # True or False # Generate the control digit clabe_number = '03218000011835971' digit = clabe.generate_check_digit(clabe_number) print(digit) # e.g., 9 # Get bank info banks = clabe.get_banks() print(banks[:2])
clabe --version
Debug
Known issues
breakingIn version 2.0.0, the API was rewritten. The old `CLABE` class is replaced by a simple function and module-level methods.
fix
Upgrade and use `from clabe import clabe` then call `clabe('...')` instead of `CLABE('...')`.
affects: <2.0.0
gotchaThe CLABE string must be exactly 18 digits. Passing digits with spaces or formatting will cause validation errors.
fix
Strip non-digit characters: `clabe('0321 8000 0118 3597 19')` fails; use `clabe('032180000118359719')`.
affects: all
gotchaThe `clabe.get_banks()` method returns a list of dicts, but the dict keys are not guaranteed to be consistent across versions.
fix
Always access dict keys safely with `.get()`, e.g., `bank.get('name')`.
affects: all
Upgrade
Version history
2.1.10latest on PyPI · released Mar 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
clabe — pip install clabe · libregistry