Skip to main content

Pesquisa de CEPs via site dos Correios

Project description

Esta biblioteca acessa o site dos Correios para fazer pesquisa por CEP.

USO

>>> from cep import Correios
>>> c = Correios()
>>> resultados = c.consulta('Juarez')
>>> len(resultados)
100
>>> resultados[64]
{'Localidade': u'Jo\xe3o Pessoa', 'Bairro': u'Torre', 'UF': u'PB', 'Logradouro': u'Avenida Juarez T\xe1vora - de 1147/1148 a 1911/', 'CEP': u'58040-021'}
>>> c.detalhe(64)
{'Localidade': u'Jo\xe3o Pessoa', 'Bairro': u'Torre', 'UF': u'PB', 'Logradouro': u'Avenida Juarez T\xe1vora - de 1147/1148 a 1911/1912', 'CEP': u'58040-021'}
>>> c.consulta('91370000', primeiro=True)
{'Localidade': u'Porto Alegre', 'Bairro': u'Vila Ipiranga', 'UF': u'RS', 'Logradouro': u'Rua Alberto Silva - at\xe9 965/966', 'CEP': u'91370-000'}

REQUIREMENTS

  • BeautifulSoup

LICENSE

  • MIT License

TODO

  • Documentação
  • Criar setup.py e registrar no PyPi
  • Hospedar API pública (json/xml)

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1

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
cep-0.1.1.tar.gz (2.9 kB) Copy SHA256 hash SHA256 Source None Jul 3, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page