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:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brazilian_ids-0.4.0.tar.gz.
File metadata
- Download URL: brazilian_ids-0.4.0.tar.gz
- Upload date:
- Size: 117.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0d4d773960d0f785fce3737e66603d270449a104ae2344a36cc96cceabae2a2
|
|
| MD5 |
2bb6815cf1dadfc99c20472634650a7f
|
|
| BLAKE2b-256 |
ac77347041fc60cd05ca0597d3228aef985cd75b1aa6221407d832c9f4824c28
|
File details
Details for the file brazilian_ids-0.4.0-py3-none-any.whl.
File metadata
- Download URL: brazilian_ids-0.4.0-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b85248fd3b75a78012c31c924df98eed5951c6ee17644b5c705431e23420caf1
|
|
| MD5 |
53653193db79e4ca5fa49ad82d1f01ed
|
|
| BLAKE2b-256 |
7401d3194683e511eb853e2461adf1682978944fcda4c6655344e56855cca9da
|