Skip to main content

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

Project description

Test codecov PyPI - Version PyPI - Python Version Pydantic V2

Install

pip install brdocs-validation

Supported docs and its formats

Supports Description Format Format's support
CNPJ 12.345.678/9012-34 OR Without special chars
CPF 123.456.789-01 OR Without special chars
CNH Only numbers Length: 11
NIS/PIS/PASEP/NIT Use NIS type for PIS, PASEP, NIT 123.45678.90-1 OR Only numbers
CNS Cartão Nacional de Saúde Only numbers
RENAVAM Only numbers Length: 9, 10 & 11
TE Título de eleitor Only numbers
CERT Certidão de casamento, nascimento e óbito Only numbers
SEI Número do Processo SEI 12345-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

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

brdocs_validation-0.5.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

brdocs_validation-0.5.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file brdocs_validation-0.5.0.tar.gz.

File metadata

  • Download URL: brdocs_validation-0.5.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brdocs_validation-0.5.0.tar.gz
Algorithm Hash digest
SHA256 435833badb81ed97ec8170a63df68f40f57146f00ce8f6710f1f4deec0bd7257
MD5 559fa945487d6a625f731ba178887cd8
BLAKE2b-256 cf10c9957d1ea9f13ff976a5cdfc1a4b020873fc7c99cdb6b2c29817ae6c2096

See more details on using hashes here.

File details

Details for the file brdocs_validation-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for brdocs_validation-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5f254fc774736e4f52110788a0c02dd406a6c28cd5c844ae567589e73ee3669
MD5 df3a915184b6fbecccbe226e6613947a
BLAKE2b-256 995f8c61c8196f405c6bdd8dd2aa41c8d47d0565151ff8b74fb2095cc1f06051

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