Skip to main content

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.

Release files for pycpf 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycpf 0.1
File Size Uploaded
pycpf-0.1.tar.gz 2.1 kB Details

Release files / pycpf-0.1.tar.gz

Download URL pycpf-0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
60098df940f2a7207fbafa243c4dff16be9a0ee051dc87bf0c6eacfaa62f2c81
BLAKE2b-256 checksum
How to use checksums
2bd31b6fe32df6db72862e21b9826a75a2d3bfa8786544ef3552f89e292c2536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page