Skip to main content

Brazilian document validator (CPF or CNPJ) using the check digit

Project description

validdocbr

Document validator (CPF or CNPJ) based on the verification digit.

Installation

pip install validdocbr

Usage Send a CNPJ or CPF as a string (may contain special characters), it can contain special characters, returns True if the document is valid or False if it is invalid, using the check digits for the conference.

Example:

import validdocbr

cpf = “12345678912” cnpj = “98765432112345”

validdocbr.cpf (cpf_valid) —> to validate CPF validdocbr.cnpj (cpf_valid) —> to validate CNPJ

answer = False —> if the document is invalid answer = True —> if the document is valid


validdocbr

Validador de documentos (CPF ou CNPJ) com base no digito verificador.

Istalação

pip install validdocbr

Utilização Ennvie um CNPJ ou CPF como string (pode conter caracteres especiais), pode conter caracteres especiais, retorna True se documento for válido ou False caso seja inválido, utilizando os digitos verificadores para conferencia.

Exemplo:

import validdocbr

cpf = “12345678912” cnpj = “98765432112345”

validdocbr.cpf(cpf_valid) —> para validar CPF validdocbr.cnpj(cpf_valid) —> para validar CNPJ

resposta = False —> caso documento seja inválido reposta = True —> caso docmunto seja válido

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

validdocbr-1.0.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

validdocbr-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file validdocbr-1.0.0.tar.gz.

File metadata

  • Download URL: validdocbr-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.17

File hashes

Hashes for validdocbr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4483e79bf9d8fc84cdc09df0b5752cf1583c84335fc896a42b18af0cc75ad83f
MD5 0e95c32dbf7492e135e96c93efe8dfb4
BLAKE2b-256 b56ee199f68c25cb1225b09f33469d10868df33e9b0e052d68357d1e76b4524a

See more details on using hashes here.

Provenance

File details

Details for the file validdocbr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: validdocbr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.17

File hashes

Hashes for validdocbr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 373ac0b9f3f160132fb9823989242be4186e19c114d0bd6d4cb0600f40761741
MD5 45fd22f83cb406d32c788ad0460c6753
BLAKE2b-256 b8cf927bf8ed5cb30464d565573bcfc8fdc1c4adbacbde4734931704467e8bb7

See more details on using hashes here.

Provenance

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