Metadata-Version: 2.1
Name: brdocs-validation
Version: 0.0.4
Summary: Validate brazilian documents using Type Hints in classes inheriting Pydantic's (V2) BaseModel
Author-email: Vinícius Aguiar <vaguiararqdevsoftware@proton.me>
Maintainer-email: Vinícius Aguiar <vaguiararqdevsoftware@proton.me>
Project-URL: Repository, https://github.com/vinicius-oa/BRdocs-validation
Keywords: pydantic-v2,cpf-validador,cnpj-validador
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pydantic >=2.0
Provides-Extra: dev
Requires-Dist: build ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'

![Test](https://github.com/vinicius-oa/BRdocs-validation/actions/workflows/test.yml/badge.svg)
![codecov](https://codecov.io/gh/vinicius-oa/BRdocs-validation/graph/badge.svg?token=Z211YIKO8L)
![Python 3.6](https://img.shields.io/badge/python-3.9_|_3.10_|_3.11_|_3.12-2334D058.svg)
![Pydantic V2](https://img.shields.io/badge/Pydantic_V2->=2.0-2334D058.svg)

## 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 

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


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