# SERPRO

Inicialmente será possível fazer consulta de `CPF's` e `CNPJ's` nas bases federais. As consultas a base da `SERPRO` são pagas e você precisará comprar uma licença mensal para consulta.

Este pacote não é oficial, mas visa facilitar as consultas de `CPF` e `CNPJ` para os desenvolvedores brasileiros.

[Ir para o respositório](https://github.com/rfschubert/schubert_serpro)

Sinta-se a vontade para ajudar abrindo `issues` e `pull requests` com melhorias e sugestões.

Você precisará configurar os dados básicos de conexão.

```python
{
    "consumer_key": "JT8.....c6a",
    "consumer_secret": "MOy...K1r"
}
```

## Dependências

Este pacote usa um validador de `CPF` e `CNPJ` a fim de evitar mandar para consulta na `SERPRO` qualquer dado inválido, evitando pagamento de valores desnecessários.

{% code title="requirements.txt" %}

```
requests==2.19.1
pycpfcnpj==1.5
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://schubert.gitbook.io/serpro/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
