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

Usage

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


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

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.3.0.tar.gz (8.1 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.3.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file brdocs-validation-0.3.0.tar.gz.

File metadata

  • Download URL: brdocs-validation-0.3.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for brdocs-validation-0.3.0.tar.gz
Algorithm Hash digest
SHA256 81015ab9e88cd893cd57ebacec42322aec2aef9962fd78bc5286d36b525abf4e
MD5 3a779fd1eef4b8bb1ad522614f317d72
BLAKE2b-256 b0243e4879550011abcf1d1b6466f4122d3b3e66a9b875f33532b859b01297d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for brdocs_validation-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56b78e1a2c3ba4a3b3be28452655429213ea5a6a60959965a33982b758b47000
MD5 cd3b258fe2b0f86b1e850e10f4eaee4a
BLAKE2b-256 33c3bb00a924a1b429c914675c955119903f9c9ff94b148001e74483a09ae236

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