Client for the Omie ERP API
Project description
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omie_python-0.0.1.tar.gz.
File metadata
- Download URL: omie_python-0.0.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7f5f3e2281c9664f4d64ab64705ed904ba8a42767061912d734a8a05d9e8b4f
|
|
| MD5 |
fb6e7d15065ad1cd57335df31c3ff5fc
|
|
| BLAKE2b-256 |
d8a22b10a6e08e8bd3944b4dffafd3f514a7bbd25a42d01b6cb2a65facfb30cc
|
File details
Details for the file omie_python-0.0.1-py3-none-any.whl.
File metadata
- Download URL: omie_python-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02053e84cf0c20836eac388007c8f639544b5e7af9e17c572146f9b3e689287d
|
|
| MD5 |
61e3d377e4a891efb741d5c349e2e3a8
|
|
| BLAKE2b-256 |
e83fdf7130f2c3cea0ef682750a9c95065bfa461822dc4d4cabcf5cb262b5b5f
|