brazilian-ids
A Python 3 package that provides functions and classes to validate several Brazilian IDs.
Documentation
Current supported IDs:
- CNPJ
- Numeração única de processo judicial
- CEP
- Município
- CPF
- PIS/PASEP
- CNO
- SQL
See the module documentation for details.
Extended CEP validation
brazilian_ids.functions.location.extended_cep validates a CEP against its actual registered state and
neighborhood by querying the ViaCEP API, instead of relying only on the static per-state
ranges used by the core cep module. It requires the extended-cep extra:
pip install brazilian-ids[extended-cep]
Development
There are no external dependencies to just use the module, with the exception of the optional
extended_cep module (see above).
Development dependencies are managed with uv and declared in the dev group of
pyproject.toml. See also the Makefile file.
To do
Create documentation at readthedocs website.- Refactor tests to use parametrized fixtures
- Benchmark algorithms to pad IDs
References
This project borrows code and ideas from the following open source projects:
See also:
Metadata
Release files for brazilian_ids 0.4.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 | |
|---|---|---|---|
| brazilian_ids-0.4.0.tar.gz | 117.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brazilian_ids-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 164.7 kB
Release files / brazilian_ids-0.4.0.tar.gz
| Download URL | brazilian_ids-0.4.0.tar.gz |
|---|---|
| Size | 117.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0d4d773960d0f785fce3737e66603d270449a104ae2344a36cc96cceabae2a2
|
|
BLAKE2b-256 checksum How to use checksums |
ac77347041fc60cd05ca0597d3228aef985cd75b1aa6221407d832c9f4824c28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / brazilian_ids-0.4.0-py3-none-any.whl
| Download URL | brazilian_ids-0.4.0-py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b85248fd3b75a78012c31c924df98eed5951c6ee17644b5c705431e23420caf1
|
|
BLAKE2b-256 checksum How to use checksums |
7401d3194683e511eb853e2461adf1682978944fcda4c6655344e56855cca9da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|