Library to validate brazilians documents, email, birthDate and others
Project description
About this package
This package is available on https://pypi.org/project/brdocvalidator/ , you can easily validate brazilians documents like CPF and CNPJ. Also some functions to help validate email, birth date, and new functionalities will appear soo
Code on github https://github.com/rafaelscone/brdocvalidator
How to use
pip3 install brdocvalidator
In your python file
import brdocvalidator
cpf = '111.111.111-11'
cnpj = '11.111.111/1111-11'
birthDay = "26/07/2010"
my_password ='JtR55$$_'
my_email = "email@email.com"
# return date format %d-%m-%Y or False
print(brdocvalidator.check_birth_date(birthDay))
# Return just CPF number or False
# check_doc check CPF or CNPJ
print(brdocvalidator.check_doc(cpf))
print(brdocvalidator.check_cpf(cpf))
# Return just CNPJ number or False
print(brdocvalidator.check_doc(cnpj))
print(brdocvalidator.check_cnpj(cnpj))
# Encode your password
encoded_password= brdocvalidator.encodePass(my_password)
print(encoded_password)
# Check if password match
test = brdocvalidator.comparePass(encoded_password,my_password)
print("Result pass:", test)
# Check email
myemail = brdocvalidator.check_email(my_email)
print(myemail)
# Generate JWT
token = brdocvalidator.generate_jwt_token("secret",{"payload": "load"})
validate_token = brdocvalidator.validate_jwt_token("other_secret",token)
print(token, validate_token)
Feel free to send me news, bugs and suggestions to this package
Rafael Schneider - rafaelscone
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brdocvalidator-0.0.9.tar.gz.
File metadata
- Download URL: brdocvalidator-0.0.9.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1f0109e012cf64671b7ee49e175215d6c68920595348655f8b9aa9d3c153a3
|
|
| MD5 |
da7c5fd2a2812c692a3d6df7a648dbcd
|
|
| BLAKE2b-256 |
ac9cb8fe88ca2b7a42d65e8439425620a09cff9164d79df4d29887fa2e906993
|
File details
Details for the file brdocvalidator-0.0.9-py3-none-any.whl.
File metadata
- Download URL: brdocvalidator-0.0.9-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a1bc54520052dbf7721cdf6c489c8a3c6593dd90c8bc4c92cf30fe1fcee6b8e
|
|
| MD5 |
7c3ff721827f80dadad71e72d8c957a2
|
|
| BLAKE2b-256 |
074ac7cd5e9c496fb544fd30e311bde2c6ded47dafceeba86a294e6229f4e8b3
|