Metadata-Version: 2.4
Name: cpf-and-cnpj-generator
Version: 1.2.2
Summary: Python package for generating valid Brazilian CPF and CNPJ values, with support for numeric CNPJ v1 and the new official alphanumeric CNPJ v2.
Author: Gabriel Logan
Maintainer: Gabriel Logan
License: MIT License
        
        Copyright (c) 2023 Gabriel Logan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project-URL: Homepage, https://gabriel-logan.github.io/Gerador-CPF-e-CNPJ-valido
Project-URL: Documentation, https://github.com/gabriel-logan/Gerador-CPF-e-CNPJ-valido/tree/main/packages/python
Project-URL: Repository, https://github.com/gabriel-logan/Gerador-CPF-e-CNPJ-valido
Project-URL: Issues, https://github.com/gabriel-logan/Gerador-CPF-e-CNPJ-valido/issues
Project-URL: Source, https://github.com/gabriel-logan/Gerador-CPF-e-CNPJ-valido/tree/main/packages/python
Keywords: cpf,cnpj,generator,python,brazil,document,validator,alphanumeric cnpj,cnpj v2,cpf generator,cnpj generator,brazilian documents,mock data,test data
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.1
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# cpf-and-cnpj-generator

[![Versão PyPI](https://badge.fury.io/py/cpf-and-cnpj-generator.svg)](https://badge.fury.io/py/cpf-and-cnpj-generator)
[![Licença: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Downloads PyPI](https://img.shields.io/pypi/dm/cpf-and-cnpj-generator.svg?style=flat-square)](https://pypistats.org/packages/cpf-and-cnpj-generator)

Sinta-se à vontade para encontrar bugs e relatá-los para mim. Seu feedback é muito apreciado. Abraços do Gabriel Logan!

Este pacote oferece geração de CPF/CNPJ com suporte ao **novo CNPJ alfanumérico** e uma implementação mais cuidadosa do que a média das bibliotecas utilitárias desse nicho.

### Instalação

```bash
pip install cpf-and-cnpj-generator
```

# Funções Disponíveis

- **generate_cnpj**: Geração de CNPJ por versão.
- **generate_cnpj_v1**: Geração de CNPJ numérico (v1).
- **generate_cnpj_v2**: Geração de CNPJ alfanumérico (v2).
- **generate_cpf**: Geração de CPF.

## Uso

Aqui está um exemplo de como usar as funções neste pacote:

```python
from cpf_and_cnpj_generator import CNPJ_V1, CNPJ_V2, generate_cnpj, generate_cpf
```

```python
# Gerar um CNPJ válido (v1 ou v2, aleatório)
cnpj = generate_cnpj()
print(cnpj)

# Gerar um CNPJ v1 explicitamente
cnpj_v1 = generate_cnpj(CNPJ_V1)
print(cnpj_v1)

# Gerar um CNPJ v2 válido (alfanumérico)
cnpj_v2 = generate_cnpj(CNPJ_V2)
print(cnpj_v2)

# Gerar um CPF válido
cpf = generate_cpf()
print(cpf)
```

## CNPJ — Versões suportadas

O gerador suporta os dois padrões oficiais de CNPJ:

- **`v1`**: CNPJ numérico tradicional, com 14 dígitos.
- **`v2`**: CNPJ alfanumérico, com 12 caracteres alfanuméricos + 2 dígitos verificadores.

Quando nenhuma versão é informada, `generate_cnpj()` escolhe aleatoriamente entre **`v1`** e **`v2`**.

Sinta-se à vontade para explorar as várias funções e experimentar diferentes entradas para entender seu comportamento. Se você encontrar algum problema ou tiver sugestões, não hesite em entrar em contato comigo. Seu feedback é valioso e ajuda a melhorar o pacote. Boa codificação!

# Por - Gabriel Logan
