clabe
Validate and generate the control digit of a CLABE in Mexico
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no security vulnerabilities, installs with minimal friction (one lightweight dependency), and directly solves a specific problem for anyone working with Mexican banking data. The pydantic integration is particularly valuable if you're already using pydantic for data validation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or higher.
- Low friction: pure Python wheel with only pydantic as a runtime dependency.
- Actively maintained with a commit as recent as 2026-08-05 and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
last release 2026-08-05 (9 days) · last repo commit 2026-08-05 · 42 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 138,258 downloads/mo, #11,334 on PyPI
Alternatives
Verify before relying
pip install clabe
from clabe import Clabe
from pydantic import BaseModel
class Account(BaseModel):
clabe: Clabe
account = Account(clabe='723010123456789019')
print(account.clabe)- Whether the bank registry is kept in sync with official Banxico SPEI participant list in practice.
- Performance characteristics when validating large batches of CLABE numbers.
What it is and what it does
clabe is a Python library for working with CLABE numbers, Mexico's standardized bank account identifiers used in the SPEI payment system. It provides validation, control digit computation, bank name lookup from the bank code, and generation of new valid CLABE numbers. The package integrates directly with pydantic as a custom type, allowing you to use CLABE as a validated field in pydantic models with automatic error reporting for invalid bank codes or malformed numbers.
The library maintains an internal registry of Mexican bank codes and names, with tooling to detect and track changes against the official Banxico participant list. As of version 2.0.0, the package requires pydantic v2 and drops support for earlier versions. You can add or remove banks programmatically, though the maintainers recommend keeping the official bank list synchronized via pull requests rather than runtime modifications.
Use it for
- Validate CLABE account numbers in financial transaction forms or APIs before processing payments.
- Use CLABE as a pydantic field type to automatically validate bank account input in data models.
- Look up the bank name from a bank code for display or reconciliation purposes.
- Generate test CLABE numbers for unit tests or sandbox environments.
- Compute the correct control digit for a partial CLABE to verify or reconstruct account identifiers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no security vulnerabilities, installs with minimal friction (one lightweight dependency), and directly solves a specific problem for anyone working with Mexican banking data. The pydantic integration is particularly valuable if you're already using pydantic for data validation.
Install
clabe on PyPI
Before you install
Low friction: pure Python wheel with only pydantic as a runtime dependency. Actively maintained with a commit as recent as 2026-08-05 and no known vulnerabilities.
Requires Python 3.8 or higher.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install clabe
from clabe import Clabe
from pydantic import BaseModel
class Account(BaseModel):
clabe: Clabe
account = Account(clabe='723010123456789019')
print(account.clabe)
Verify before relying
- Whether the bank registry is kept in sync with official Banxico SPEI participant list in practice.
- Performance characteristics when validating large batches of CLABE numbers.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepydantic |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,258 / month, #11,334 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: clabe-2.1.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “CLABE validation Mexico”
- clabeValidates and generates CLABE numbers, Mexico's standard bank account…
- pydantic_corepydantic-core provides the high-performance validation and…
- CerberusCerberus validates Python dictionaries and documents against a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also python-stdnum · validate-docbr · python-bcb · pyjokes · fints · bump-pydantic · gcld3 · country-converter · workadays · luhn