Skip to main content

brasilkit

Biblioteca Python com utilidades para trabalhar com dados brasileiros.

Funcionalidades

  • CPF: limpeza, validação e formatação.
  • CNPJ: limpeza, validação e formatação.
  • CEP: limpeza e formatação.
  • Moeda: formatação de valores no padrão brasileiro.
  • Datas: formatação de datas para o padrão DD/MM/AAAA.
  • Telefone: limpeza e formatação de números de telefone brasileiros.

Exemplos de uso

CPF

from brasilkit.cpf import formatar_cpf, validar_cpf

cpf = "52998224725"

print(validar_cpf(cpf))
print(formatar_cpf(cpf))

CNPJ

from brasilkit.cnpj import formatar_cnpj, validar_cnpj

cnpj = "11222333000181"

print(validar_cnpj(cnpj))
print(formatar_cnpj(cnpj))

CEP

from brasilkit.cep import formatar_cep

print(formatar_cep("31250000"))

Moeda

from brasilkit.moeda import formatar_moeda

print(formatar_moeda(1500.50))

Datas

from brasilkit.datas import formatar_data

print(formatar_data("2026-10-10"))

Telefone

from brasilkit.telefone import formatar_telefone

print(formatar_telefone("31999998888"))

Testes

Os testes automatizados são executados com pytest:

pytest -v

Autor

André Luiz de Souza

Licença

Este projeto será distribuído sob a licença MIT.

Metadata

Release files for brasilkit 0.1.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 brasilkit 0.1.0
File Size Uploaded Provenance Actions
brasilkit-0.1.0.tar.gz 4.8 kB Without provenance Details for brasilkit-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.3 kB

Release files / brasilkit-0.1.0.tar.gz

Download URL brasilkit-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2f005d9f7176802ea2b29b04666d7e6f41c5f121aaf72ec2402bec2c513edbfe
BLAKE2b-256 checksum
How to use checksums
7891f0a4540b2cf17fb506ebe72939201fcad9f93d37343caaa990252202290a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / brasilkit-0.1.0-py3-none-any.whl

Download URL brasilkit-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
343d45e763bca8eaac6c94299ef10e69627e1744842804dd02cbdf5d5321914d
BLAKE2b-256 checksum
How to use checksums
07655ebfcbdcefa24fd3acbe9e84f1702f21056392d25e43f3c0a0f554f2c9d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for brasilkit 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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