Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

API for correios in Python

Project Description

API Correios

If you have _setuptools_ you can use

$ easy_install -U pycorreios

Otherwise, you can download the source from [GitHub][git] and run

$ python install

[git]: "PyCorreios"

Some simple examples of what pyCorreios code looks like:

from pycorreios import Correios

# with a dictionary paramenter - the field order doesn't matter
fields = {"cod": Correios().SEDEX,
"GOCEP": "44001535",
"HERECEP": "03971010",
"peso": "2",
"formato": "1", # caixa/pacote
"comprimento": "18",
"altura": "8",
"largura": "24",
"diametro": "12"}

test = Correios().frete(**fields) # remember to call with **

# or with positional parameters - same result as above
test = Correios().frete(Correios().SEDEX,'44001535','03971010',2,1,18,8,24,12)

if test['Erro'] != '0':
print 'Deu erro! :('
print test['Erro']
print test['MsgErro']
print "Valor: R$%s\nPrazo de Entrega: %s" % (test['Valor'],test['PrazoEntrega'])

other_test = Correios().cep('03971010')
for tag_name in other_test.keys():
print tag_name + ': ' + other_test[tag_name]

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.3 kB) Copy SHA256 Hash SHA256
Source None Apr 20, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate