You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

brdocs-validation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brdocs-validation

Validate brazilian documents using Type Hints in classes inheriting Pydantic's (V2) BaseModel

0.4.0
pipPyPI
Maintainers
1

Test codecov PyPI - Version PyPI - Python Version Pydantic V2

Install

pip install brdocs-validation

Supported docs and its formats

SupportsDescriptionFormatFormat's support
CNPJ12.345.678/9012-34 OR Without special chars
CPF123.456.789-01 OR Without special chars
CNHOnly numbersLength: 11
NIS/PIS/PASEP/NITUse NIS type for PIS, PASEP, NIT123.45678.90-1 OR Only numbers
CNSCartão Nacional de SaúdeOnly numbers
RENAVAMOnly numbersLength: 9, 10 & 11
TETítulo de eleitorOnly numbers
CERTCertidão de casamento, nascimento e óbitoOnly numbers
SEINúmero do Processo SEI12345-67890123/4567-89 OR without special chars

Usage

from br_docs import CNPJ, CPF, CNH, NIS, CNS, RENAVAM, TE, CERT, SEI
from pydantic import BaseModel


class User(BaseModel):
    cpf: CPF
    cnpj: CNPJ
    cnh: CNH
    nis: NIS
    cns: CNS
    renavam: RENAVAM
    te: TE
    cert: CERT
    sei: SEI

Keywords

pydantic-v2

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts