Skip to main content

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

Project description

Test codecov Python 3.6 Pydantic V2

Install

pip install brdocs-validation

Supported docs and its formats

Supports Format
CNPJ 12.345.678/9012-34 OR Without special chars
CPF 123.456.789-01 OR Without special chars
CNH Only numbers

Usage

from br_docs import CPF, CNPJ, CNH
from pydantic import BaseModel


class User(BaseModel): 
    name: str
    age: int
    cpf: CPF
    cnpj: CNPJ
    cnh: CNH

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.0.4.tar.gz (5.2 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.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brdocs-validation-0.0.4.tar.gz
  • Upload date:
  • Size: 5.2 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.0.4.tar.gz
Algorithm Hash digest
SHA256 f4628f3817691ad58cab1453ab9acff8053c4e21aecf4635d354bf8b8017374d
MD5 783e5bfa5f1c4f7531db915db5fb4d0e
BLAKE2b-256 80cc26fbbafda8805f710fc26bd5a126249dab3c9814c7c3789d7c91943813f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for brdocs_validation-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0d7a75db341507df624be5355987aacc79c08d60da05f6d50922065af5c4f04e
MD5 7695e454609fd7e2b5d17b2b087a24e7
BLAKE2b-256 317d0fdc576e88261ce73763ba59cad8e4c90dff6ae1b37fce77d613e731b0a4

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