Skip to main content

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 

Metadata

Release files for correios-utils 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for correios-utils 0.1.2
File Size Uploaded Provenance
correios-utils-0.1.2.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for correios-utils 0.1.2
File Interpreter ABI Platform
correios_utils-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / correios-utils-0.1.2.tar.gz

Download URL correios-utils-0.1.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
361fa28e82e9ed1bbfb9dd4b9207c6a7db3f54e323d6c07196dccc33735c9266
BLAKE2b-256 checksum
How to use checksums
f79892e3f847f248e19a08cc70e5393327990dd50e179f6c768c1d6aac2b2ce4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64

Release files / correios_utils-0.1.2-py3-none-any.whl

Download URL correios_utils-0.1.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
284971f5cf9cd58ca39d1385b7b12a73727de7de4199bbacf06515e0f9f9139e
BLAKE2b-256 checksum
How to use checksums
d43f4ba4d3e366eb7a2a659e94d0a33a08ed1075c95223a0240be0e50cd168a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64

Security for correios-utils 0.1.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.

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