Skip to main content
# totverprm
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'}
)
```


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)

Table of built distributions (wheels) for totvserprm 1.11.2
File Interpreter ABI Platform
totvserprm-1.11.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

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

Release history Release notifications | RSS feed

This release

1.11.2 This release

1 release file

1.11.1

1 release file

1.11

2 release files

1.10

2 release files

1.9.2

1 release file

1.9.1

1 release file

1.9.0

1 release file

1.8.3

1 release file

1.8.2

1 release file

1.8.1

1 release file

1.8.0

1 release file

1.7.2

1 release file

1.7.1

1 release file

1.6.2

1 release file

1.6.1

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3.1

1 release file

1.3

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page