Skip to content

This Python module validates and formats CPF numbers, ensuring they are correct and follow the standard Brazilian format.

Notifications You must be signed in to change notification settings

adryansf/cpfpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

MIT

About

This Python module validates and formats CPF numbers, ensuring they are correct and follow the standard Brazilian format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages