Skip to main content

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

MIT

Project details


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpfpy-0.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file cpfpy-0.0.1.tar.gz.

File metadata

  • Download URL: cpfpy-0.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for cpfpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8b32b47b26323ab535cb58748ba12d4ac6d21fee66fc5bf7686a6b7d091ab21c
MD5 fcd37f92b33861c0bd098b74274590b9
BLAKE2b-256 7e20fa1d6674795d35f10a3e3f1aa08a5e0cc423e2008949bf00475d8d4c6bcb

See more details on using hashes here.

File details

Details for the file cpfpy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cpfpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for cpfpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78fc1a8095ca729193ea327e58777abad5ea3a282df556bb2eee610b9108741f
MD5 28c58eda1b0807da93e212695869755f
BLAKE2b-256 cbbc04b44551dc00762e81ff6cf215e92b96cd0dc47ce962c7ebf72328583a0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page