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()
or to validate an existing CPF:
>>> CPF('53587674019').valid()
CPF objects can also be compared to strings:
>>> CPF('53587674019') == '53587674019'
or even converted to strings:
>>> str(CPF('53587674019'))


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

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Source Distribution

pycpf-0.1.tar.gz (2.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page