Skip to content

feat: add pydantic-brasil to Utils - #349

Open
Luan1Schons wants to merge 1 commit into
mjhea0:mainfrom
Luan1Schons:add-pydantic-brasil
Open

Luan1Schons wants to merge 1 commit into
mjhea0:mainfrom
Luan1Schons:add-pydantic-brasil

Conversation

@Luan1Schons

Copy link
Copy Markdown

Adds pydantic-brasil to the Utils section.

pydantic-brasil provides native Pydantic v2 custom types for Brazilian data formats — a common need in FastAPI applications serving the Brazilian market.

Supported types

Category Types
Identity CPF, CNPJ, CNH, RG, PIS/PASEP, Título de Eleitor, CNS, Processo CNJ
Address CEP
Fiscal NF-e/CT-e/MDF-e access key (DF-e, 44-digit SEFAZ Módulo 11), GTIN/EAN (GS1)
Finance Boleto Bancário (FEBRABAN Módulo 10/11, maturity date, 2025 factor rollover), IBAN-BR (Bacen Circular 3.625)
Logistics Correios tracking code (UPU S10, Módulo 11 DV)
Vehicles Mercosul license plate, RENAVAM
Misc PIX key, Inscrição Estadual (all 27 states), Certidão Civil, BancoBR

All types natively generate correct FastAPI/OpenAPI schemas with json_schema_extra, validate via Pydantic v2 core schema, and are mypy --strict compliant.

PyPI: https://pypi.org/project/pydantic-brasil/
GitHub: https://github.com/Luan1Schons/pydantic-brasil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant