Metadata-Version: 2.1
Name: omie-python
Version: 0.0.1
Summary: Client for the Omie ERP API
Author-email: Lucas Schneider <lucasschneider.dev@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Lucas Schneider
        
        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://github.com/schneider8357/omie-python
Keywords: omie,api,client
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cachetools==5.3.3
Requires-Dist: openpyxl==3.1.2
Requires-Dist: pandas==2.2.2
Requires-Dist: pydantic==2.7.1
Requires-Dist: python-dotenv==1.0.1
Requires-Dist: requests==2.31.0
Requires-Dist: typer==0.12.3

# omie-python
Interface simples em Python para a Omie API.

Este projeto está em fase de testes, portanto algumas coisas podem quebrar inesperadamente.


## Quickstart

Instalação:

```
git clone https://github.com/schneider8357/omie-python
cd omie-python
pip install -r requirements.txt
```

Crie um arquivo .env para armazenar a sua app_key e secret_key:

```
OMIE_APP_KEY='3833xxxxxxx'
OMIE_APP_SECRET='fed2xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
```

Utilização:

```python
api = omie.OmieClient(app_key, app_secret)

data = {
    "nPagina": 2,
    "nRegPorPagina": 1,
}
```

> [!IMPORTANT]  
> Não deixe as suas chaves app_key e app_secret no seu código! Ao invés disso, utilize a biblioteca python-dotenv


## Methods

Consulte os métodos no arquivo `omie/methods.py`

Os métodos já implementados são: 

- **ConsultarPedido**
- **ListarEtapasPedido**
- **ListarEtapasFaturamento**
- **ConsultarVendedor**
- **ConsultarProjeto**

Ainda faltam implementar, pelo menos:
- **AlterarProduto**
- **ConsultarCliente**
- **ListarCenarios**
- **ListarClientes**
- **ListarLocaisEstoque**
- **ListarImpostosCenario**
- **ListarPosEstoque**
- **ListarProdutos**
- **ListarTabelaItens**
- **ListarTabelasPreco**

## Schemas

O schema é uma forma de validar os dados que serão enviados para a Omie API.
Para esta validação, a biblioteca pydantic é utilizada. Ela valida os tipos
dos dados e exporta os modelos para JSON. Confira os exemplos em `omie/schemas.py`.

