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 details)

Uploaded Source

Built Distribution

simple_cpf-0.1.4-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file simple_cpf-0.1.4.tar.gz.

File metadata

  • Download URL: simple_cpf-0.1.4.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.5 Linux/6.0.12-76060006-generic

File hashes

Hashes for simple_cpf-0.1.4.tar.gz
Algorithm Hash digest
SHA256 13ff757b662edd0133278c21f61c18bc4d4d7a39d39be09884eb783d05eddbad
MD5 aa57eeab529270a152e7656854f6bd94
BLAKE2b-256 c17e4b805389098d7096efe30fbb7a60e3f65a0c267c662cae90b748ccba61bb

See more details on using hashes here.

File details

Details for the file simple_cpf-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: simple_cpf-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.5 Linux/6.0.12-76060006-generic

File hashes

Hashes for simple_cpf-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d3610c1c3a5df106093454c193e65e42f162007975176c3fe81366ab6705ae7a
MD5 1e717bd578b12ecfd8e15eaa712996ac
BLAKE2b-256 724855729d6c2fb4bfa9df40eda806b898cbd2166c52266bcbb51802a1497276

See more details on using hashes here.

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