Skip to main content

No project description provided

Project description

cpf_tools

made-with-python GitHub Workflow Status Total alerts Language grade: Python PyPi Anaconda

Biblioteca com ferramentas para auxiliar na checagem, formatação etc. de CPFs.

Instalação:

$ pip install cpf-tools

Funções:

  • cpf-tools.cpf_int_validation(cpf: int) -> bool:

Essa função recebe um valor inteiro e verifica se o digito verificador do CPF é verdadeiro (True) ou falso (False).

  • cpf-tools.cpf_str_validation(cpf: str) -> bool:

Essa função recebe um valor string e verifica se o digito verificador do CPF é verdadeiro (True) ou falso (False).

  • cpf-tools.cpf_format(cpf: Union[int, str, float]) -> str:

Essa função recebe um valor integer, string ou float de um CPF e retorna uma string formatada. (Exemplo: "00000000000" -> "000.000.000-00")

Usando com Pandas:

Para utilizar com a biblioteca Pandas, utilize o seguinte comando:

df['your-cpf-field'].apply(cpf-tools.cpf_int_validation) ou

df['your-cpf-field'].apply(cpf-tools.cpf_str_validation) ou

df['your-cpf-field'].apply(cpf-tools.cpf_format)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpf_tools-1.5.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

cpf_tools-1.5.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file cpf_tools-1.5.1.tar.gz.

File metadata

  • Download URL: cpf_tools-1.5.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 CPython/3.10.4

File hashes

Hashes for cpf_tools-1.5.1.tar.gz
Algorithm Hash digest
SHA256 63e615ee8360a403f7eec27b6001e65c71608953ad7760fa771cb7ace02155d6
MD5 7ef4ca15643e85f12a9f5a5a08c29b7c
BLAKE2b-256 9e74d285fcf47b3e72460376249820e215d484ff8afd417f0f2adf87ba7ebf60

See more details on using hashes here.

File details

Details for the file cpf_tools-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: cpf_tools-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 CPython/3.10.4

File hashes

Hashes for cpf_tools-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b493215d9bf47d440d37094772ffc640cd8508462aa864ac5506a60634ef63
MD5 8be6dead8ded8db2c9ff7ef61c644356
BLAKE2b-256 b33ad3d9b77d7e462f04cbe5f7cda61050c6dde6aa4fcaa8e5223db2e02d6cce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page