No project description provided
Project description
Correios Python 🚚
correios-utils - Biblioteca para a realização de cotação de frete de encomendas no serviço dos Correios
Instalação 📦
pip install correios-utils
Exemplo de uso 📚
from correios_utils import (
Cotacao,
FormatoEncomenda,
SimNao,
Servico,
realizar_cotacao,
get_descricao_servico,
)
if __name__ == '__main__':
servicos = realizar_cotacao(
cep_origem="70002900",
cep_destino="04547000",
codigos_servicos=[Servico.PAC, Servico.SEDEX, Servico.SEDEX_10],
peso=1,
comprimento=20,
altura=20,
largura=20,
diametro=0,
formato_encomenda=FormatoEncomenda.CAIXA_PACOTE,
valor_declarado=0,
mao_propria=SimNao.NAO,
aviso_recebimento=SimNao.NAO,
codigo_empresa="08082650",
senha_empresa="564321",
)
for servico in servicos:
if not servico.erro:
print(f"Correios {get_descricao_servico(servico.codigo)}")
print(f"Valor: R$ {servico.valor}")
print(f"Prazo: {servico.prazo_entrega} dias", "\n")
Saída 📋
Correios PAC
Valor: R$ 27.8
Prazo: 7 dias
Correios SEDEX
Valor: R$ 53.1
Prazo: 1 dias
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
correios-utils-0.1.2.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file correios-utils-0.1.2.tar.gz
.
File metadata
- Download URL: correios-utils-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 361fa28e82e9ed1bbfb9dd4b9207c6a7db3f54e323d6c07196dccc33735c9266 |
|
MD5 | 759ed1cb7200327edb7097b64e947f51 |
|
BLAKE2b-256 | f79892e3f847f248e19a08cc70e5393327990dd50e179f6c768c1d6aac2b2ce4 |
File details
Details for the file correios_utils-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: correios_utils-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 284971f5cf9cd58ca39d1385b7b12a73727de7de4199bbacf06515e0f9f9139e |
|
MD5 | 7e2c678921bfb15f0864170d11e9469a |
|
BLAKE2b-256 | d43f4ba4d3e366eb7a2a659e94d0a33a08ed1075c95223a0240be0e50cd168a2 |