This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

brzipcode is a lightweight app for retrieving brazilian addresses from a zip code

Project Description

brzipcode é uma lib Python simples para retornar o endereço a partir do CEP, com dados provenientes do webservice brzipcode.com.

Para instalar execute:

pip install brzipcode

E então usar conforme abaixo:

>>> from brzipcode import BRZipCode
>>> print BRZipCode.get('04538132', token='ycmVyGJO3HAw...') # *
{u'status': True, u'city': u'S\xe3o Paulo', u'state': u'SP', u'neighborhood': u'Itaim Bibi', u'address': u'Avenida Brigadeiro Faria Lima - de 3252 ao fim - lado par'}

** Para solicitar um token acesse http://brzipcode.com/ (gratuito) **

Caso não encontre nenhum resultado:

>>> print BRZipCode.get('00000000', token='ycmVyGJO3HAw...')
{u'status': False, u'error_message': u'not_found'}

Suporte a projetos Django

Para utilizar em seu projeto Django, inclua BRZIPCODE_TOKEN e atualize o INSTALLED_APPS no arquivo settings.py

BRZIPCODE_TOKEN = 'ycmVyGJO3HAw...'

...

INSTALLED_APPS = (
    ...
    'brzipcode',
)

Adicionar a url do serviço no urls.py

urlpatterns = patterns('',
    ...
    url(r'^brzipcode/', include('brzipcode.urls')),
)

E acesse:

http://localhost:8000/brzipcode/?zip_code=04538132
Release History

Release History

This version
History Node

0.1.2

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
brzipcode-0.1.2.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source May 25, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting