Skip to main content

Generate, Validate and Format brazilian CPF

Project description

CPF-Generator

License PyPI PyPI - Python Version Downloads

Installing

$ pip install cpf-generator

Usage

from cpf_generator import CPF

cpf = CPF.generate() # Will generate a random CPF # EX: 46064927240
formatedCpf = CPF.format(cpf) # Will format the CPF to be printed in some place # EX: 460.649.272-40
CPF.unformat(formatedCPF) # Works with formated CPF # EX: 46064927240
CPF.validate(cpf) # Will return True if the CPF is valid or False if not # EX: True
CPF.validate(formatedCPF) # Works with formated CPF # EX: True

by Matheus Almeida

Work with braziian CPF easily

MIT License

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_generator-2.1.4.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

cpf_generator-2.1.4-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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