API for correios in Python
Project description
API Correios
============
Installation
============
If you have _setuptools_ you can use
$ easy_install -U pycorreios
Otherwise, you can download the source from [GitHub][git] and run
$ python setup.py install
[git]: https://github.com/avelino/pycorreios "PyCorreios"
Examples
========
Some simple examples of what pyCorreios code looks like:
# -*- coding: utf-8 -*-
from pycorreios import Correios
test = Correios().frete(Correios().SEDEX,'44001535','03971010',10,18,8)
if test['Erro'] != '0':
print 'Deu erro! :('
print test['Erro']
print test['MsgErro']
else:
print "Valor: R$%s\nPrazo de Entrega: %s" % (test['Valor'],test['PrazoEntrega'])
print
other_test = Correios().cep('03971010')
for tag_name in other_test.keys():
print tag_name + ': ' + other_test[tag_name]
============
Installation
============
If you have _setuptools_ you can use
$ easy_install -U pycorreios
Otherwise, you can download the source from [GitHub][git] and run
$ python setup.py install
[git]: https://github.com/avelino/pycorreios "PyCorreios"
Examples
========
Some simple examples of what pyCorreios code looks like:
# -*- coding: utf-8 -*-
from pycorreios import Correios
test = Correios().frete(Correios().SEDEX,'44001535','03971010',10,18,8)
if test['Erro'] != '0':
print 'Deu erro! :('
print test['Erro']
print test['MsgErro']
else:
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]
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
pycorreios-0.1-py2.6.egg
(4.8 kB
view details)
File details
Details for the file pycorreios-0.1-py2.6.egg
.
File metadata
- Download URL: pycorreios-0.1-py2.6.egg
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79cb66eb62d068f8110fecd8683aacbb3e426b02d78aecdc496ac5c39c2439ac |
|
MD5 | 90d05cfd9ab1d524aabdb0927f52d2f2 |
|
BLAKE2b-256 | 9ae32e13ecbff1566f14634fddb755c7e12309f4c50d37f89b7cfe2f1e6e76c3 |