Skip to main content

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)

Source distribution for brazilian_ids 0.4.0
File Size Uploaded Provenance Actions
brazilian_ids-0.4.0.tar.gz 117.9 kB Without provenance Details for brazilian_ids-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brazilian_ids 0.4.0
File Interpreter ABI Platform Actions
brazilian_ids-0.4.0-py3-none-any.whl Python 3 none any Details for brazilian_ids-0.4.0-py3-none-any.whl

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}

Security for brazilian_ids 0.4.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page