Python module for Brazilian register numbers for persons (CPF) and companies (CNPJ). It provides functions to validate, format, and generate CPF and CNPJ numbers. Current version: 1.9, requires Python >=3.8, <4. Release cadence is irregular.
pip install pycpfcnpjNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: validate and generate CPF/CNPJ numbers.
Update code to check return value instead of catching exceptions.
Import from `pycpfcnpj.cpf` and `pycpfcnpj.cnpj` directly.
Always pass the full 11-digit (CPF) or 14-digit (CNPJ) string without extra characters.
Use `from pycpfcnpj import cpf; cpf.validate('12345678909')`.Correct import: `from pycpfcnpj import cnpj`.
Ensure CNPJ is exactly 14 digits, and use a valid number. Generate a valid one with `cnpj.generate()`.
No resource links recorded.