This Python module validates and formats CPF numbers, ensuring they are correct and follow the standard Brazilian format.
Project description
CPFPY
This Python module provides tools for validating and formatting CPF numbers.
Installation
To install, you can use pip:
pip install cpfpy
Usage
Validation
from cpfpy import validate_cpf
cpf = "123.456.789-09"
if validate_cpf(cpf):
print("Valid CPF!")
else:
print("Invalid CPF.")
Formatting
from cpfpy import format_cpf
cpf = "12345678909"
formatted_cpf = format_cpf(cpf)
print(formatted_cpf) # Output: 123.456.789-09
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cpfpy-0.0.1.tar.gz
(2.4 kB
view hashes)
Built Distribution
cpfpy-0.0.1-py3-none-any.whl
(3.2 kB
view hashes)