API para acesso aos Webservices do TOTVS ERP RM.
## Instalação
pip install totverprm
### Exemplo para retornar dados de um cliente:
```python
from totvserprm.financial import Client
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
client = Client(server, username, password)
client_1 = client.get(codcoligada=0, id='0000496')
```
### Exemplo para retornar dados de todos clientes:
```python
from totvserprm.financial import Client
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
client = Client(server, username, password)
clients = client.all(codcoligada=0)
```
### Exemplo para criação de um aluno:
```python
from datetime import datetime
from totvserprm.educational import Student
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
stundet = Student(server, username, password)
stundet.create(
codcoligada=1,
codtipocurso=1,
data_nascimento=datetime(1992, 2, 3, 4, 5),
estado_natal='MG',
naturalidade='Belo Horizonte',
cpf='11781328110',
nome='Fulano de tal',
sexo='Masculino',
tipo_rua=1, # RUA = 1 / AVENIDA = 6
tipo_bairro=1, # BAIRRO = 1
bairro='Belvedere',
rua='Rua Professor Pedro Aleixo',
numero=695,
estado='MG', # EX = Exterior
cidade='Belo Horizonte',
codigo_municipio=06200, # Ultimos 5 digitos do codigo do ibge do município
pais='Brasil',
cep='30320-300',
codcurso='00001',
codcliente='0000001',
codcoligada_cliente=0,
email='teste@vetrol.com.br',
telefone1='(32) 99999-9999',
telefone2='(31) 99999-9998',
telefone3='(31) 99999-9997'
)
```
### Exemplo para criação de um cliente:
```python
from datetime import datetime
from totvserprm.financial import Client
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
client = Client(server, username, password)
client.create(
ativo=True,
codexterno=1,
codcoligada=0,
codcoligada_contexto=1,
tipo_cliente='000', # 000 para Aluno
cpf_cnpj='11781328110', # Sem formatação
tipo_rua=1, # RUA = 1 / AVENIDA = 6
tipo_bairro=1, # BAIRRO = 1
bairro='Belvedere',
rua='Rua Professor Pedro Aleixo',
numero=695,
estado='MG', # EX = Exterior
cidade='Belo Horizonte',
codigo_municipio=06200, # Ultimos 5 digitos do codigo do ibge do município
pais=1, # 1 = Brasil, 2 = Portugal, 11 = Angola
data_nascimento=datetime(1990,5,14),
nome='Fulano de tal',
classificacao=1, # 1 = Cliente, 2 = Fornecedor, 3 = Ambos
categoria='F', # F = Pessoa Física, J = Pessoa Jurídica
cep='30320-300',
email='teste@vetrol.com.br',
)
```
### Exemplo para criação de um boleto:
```python
from datetime import datetime
from totvserprm.financial import Billet
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
boleto = Billet(server, username, password)
boleto.create(
codcoligada=1,
codcoligada_contexto=1,
codcoligada_cfo=0,
codcoligada_fin=0,
data_vencimento=datetime(2017,10,30),
valor='100,55', # Enviar string com separação por vírgula
codcliente='0000470',
codfilial=1,
classificacao=1, # 1 = Receber, 2 = Pagar
tipo_documento='999', # 999 = Taxa de adesão
historico='Teste', # Descrição
centro_custo='01.019',
codnatfinanceira='01.001.0001',
id_vendedor=1400
)
```
### Exemplo de consulta SQL:
```python
from totvserprm.retrieve import ConsultSQL
server = '192.168.1.100:8051'
username = 'admin'
password = 'admin'
consultsql = ConsultSQL(server, username, password)
consultsql.get(
codcoligada=0,
codsistema='F',
codsentenca='CODIGO_CONSULTA',
parameters={'PARAMETRO_1': 'VALOR_1', 'PARAMETRO_2': 'VALOR_1'}
)
```
Metadata
Release files for totvserprm 1.11.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| totvserprm-1.11.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for totvserprm-1.11.2-py2.py3-none-any.whl |
Release files / totvserprm-1.11.2-py2.py3-none-any.whl
| Download URL | totvserprm-1.11.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4b9580bda66a3fdb7d25880cf03efe823ea4371ccc1973153b8d2a849be3ea35
|
|
BLAKE2b-256 checksum How to use checksums |
35e167604d4267be744344f23095b3093405418a0ffd0596239fd4153cb481e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for totvserprm 1.11.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.