Skip to main content

CPF generation and validation

Project description

CPF validator and generator.

How to use

First, install pycpf:
$ pip install pycpf
Then you can use it for generating a new CPF:
>>> from pycpf import CPF
>>> CPF()
CPF('53587674019')
or to validate an existing CPF:
>>> CPF('53587674019').valid()
True
CPF objects can also be compared to strings:
>>> CPF('53587674019') == '53587674019'
True
or even converted to strings:
>>> str(CPF('53587674019'))
'535.876.740-19'

License

This software is licensed through BSD 2-clause license. Please read “LICENSE” for more information.

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pycpf, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size pycpf-0.1.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page