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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4483e79bf9d8fc84cdc09df0b5752cf1583c84335fc896a42b18af0cc75ad83f |
|
MD5 | 0e95c32dbf7492e135e96c93efe8dfb4 |
|
BLAKE2b-256 | b56ee199f68c25cb1225b09f33469d10868df33e9b0e052d68357d1e76b4524a |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 373ac0b9f3f160132fb9823989242be4186e19c114d0bd6d4cb0600f40761741 |
|
MD5 | 45fd22f83cb406d32c788ad0460c6753 |
|
BLAKE2b-256 | b8cf927bf8ed5cb30464d565573bcfc8fdc1c4adbacbde4734931704467e8bb7 |