Skip to main content

A simple script to manipulate and validate CPF

Project description

Simple CPF

A simple package to validate and format the CPF - Brazil Identification Card.

Installation

pip install simple-cpf

How to use

import simple_cpf.simple_cpf import CPF

# validating a cpf
CPF.is_valid('117.762.459-11')  # True
CPF.is_valid('117.762.459-19')  # False

# generating a fake cpf
CPF.fake()                      # '917.350.558-75'

# formatting a valid cpf
CPF.formatted('10757246354')    # '107.572.463-54'
                                # in case of invalid cpf, it will return:
                                # 'Enter a valid CPF.'

Made by:

cesargodoi - https://github.com/cesargodoi/simple_cpf

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

simple_cpf-0.1.4.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

simple_cpf-0.1.4-py3-none-any.whl (2.3 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