$npx skillfedfor your agent

validate-docbr

Validate brazilian documents.

Worth itPyPI UtilitiesReleased Apr 2026255.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — validate_docbr-2.0.0-py3-none-any.whl
v2.0.0 · released 2026-04-04 · Python >=3.10

Yes. The package is actively maintained, has no dependencies, supports current Python versions, carries a permissive MIT license, and fills a clear need for Brazilian document validation in Portuguese-language applications. No known vulnerabilities. Install if you work with Brazilian identity or registration documents.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low install friction with no runtime dependencies.
  • Actively maintained with recent releases and a stable repository; supports current Python versions.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for commercial and open-source projects.

last release 2026-04-04 (132 days) · last repo commit 2026-07-10 · 484 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 255,664 downloads/mo, #8,474 on PyPI

Verify before relying

pip install validate-docbr

from validate_docbr import CPF

cpf = CPF()
print(cpf.validate("012.345.678-90"))  # True
print(cpf.generate(mask=True))
  • Whether all document types support all four methods (validate, validate_list, generate, mask) equally.
  • Performance characteristics when validating large lists of documents.
Same gist for agents: .md · .json

What it is and what it does

validate-docbr is a Python package for validating and generating Brazilian official documents. It provides a unified interface for eight document types: CPF (individual taxpayer ID), CNPJ (business registration), CNH (driver's license), CNS (health card), PIS (social security), electoral registration, RENAVAM (vehicle registration), and civil registry certificates. Each document type is implemented as a class with consistent methods for validation, batch validation, generation, and formatting.

The package is designed for use in Brazilian applications that need to verify user-supplied document numbers or generate test data. It has no external dependencies, making it lightweight to integrate. All document classes follow the same API: validate() checks a single document, validate_list() processes multiple documents, generate() creates new valid documents optionally with formatting masks, and mask() applies standard Brazilian formatting to a document string.

Use it for

  • Validate user-submitted CPF or CNPJ during account registration or payment processing.
  • Generate realistic test data for Brazilian-focused applications during development and QA.
  • Batch-validate document lists imported from external sources or databases.
  • Format document numbers with standard Brazilian punctuation for display in user interfaces.
  • Verify multiple different document types in a single operation using the package-level validate_docs function.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no dependencies, supports current Python versions, carries a permissive MIT license, and fills a clear need for Brazilian document validation in Portuguese-language applications. No known vulnerabilities. Install if you work with Brazilian identity or registration documents.

Install

validate-docbr on PyPI

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent releases and a stable repository; supports current Python versions.

Requires Python 3.10 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for commercial and open-source projects.

Quickstart

pip install validate-docbr

from validate_docbr import CPF

cpf = CPF()
print(cpf.validate("012.345.678-90"))  # True
print(cpf.generate(mask=True))

Verify before relying

  • Whether all document types support all four methods (validate, validate_list, generate, mask) equally.
  • Performance characteristics when validating large lists of documents.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 132 days since the last release
Last repo commit
First released
Downloads255,664 / month, #8,474 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Evidence: validate_docbr-2.0.0-py3-none-any.whl

Tags

Capabilities
brazilian document validationcpf cnpj validatorvalidate brazilian idbrazilian document generatorbrazilian registry documentsdocument mask formatterbrazilian identity verification
Topics
brazilian-documentsvalidationdata-generation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “brazilian document validation”

  • validate-docbrValidates and generates Brazilian identity and registration documents…
  • brazilnumValidates and formats Brazilian identification numbers including…
  • BrazilFiscalReportConverts Brazilian electronic invoice XML files (NF-e, CT-e, MDF-e,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also brazilnum · clabe · BrazilFiscalReport · python-bcb · spdx3-validate · workadays · validate_email · python-stdnum · spdx-tools · tlds