Skip to main content

API para consulta de endereços e CEPs utilizando o site dos Correios

Project description

Consulta Correios

API for querying addresses and zip codes using the Correios website (Brazil postal system)

Requirements

  • Python 3.5+
  • beautifulsoup4
  • requests
  • unidecode

Installation

Consulta Correios can be installed using pip:

$ pip install Consulta-Correios

If you want to run the latest version of the code, you can install from git:

$ pip install -U git+git://github.com/arthurfortes/consulta_correios.git

Quick Start and Guide

This API allows querying both zip codes and address through the same call. See the example commands below:

>>> import consulta_correios

>>> address = consulta_correios.busca_cep('Av. Júlio Prestes')
>>> print(address)
{'address': 'Avenida Julio Prestes', 'neighborhood': 'Taquaral', 'city/state': 'Campinas/SP', 'zipcode': '13076-001'}
>>> import consulta_correios

>>> address = consulta_correios.busca_cep('13076-001')
>>> print(address)
{'address': 'Avenida Julio Prestes', 'neighborhood': 'Taquaral', 'city/state': 'Campinas/SP', 'zipcode': '13076-001'}

Contributions and issues

To help the project with contributions follow the steps:

  • Fork Consulta Correios

  • Make your alterations and commit

  • Create a topic branch - git checkout -b my_branch

  • Push to your branch - git push origin my_branch

  • Create a Pull Request from your branch.

  • You just contributed to the Consulta Correios project!

For bugs or feedback use this link: https://github.com/arthurfortes/consulta_correios/issues

License (MIT)

© 2020. Consulta Correios All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Project details


Download files

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

Source Distribution

Consulta Correios-1.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

Consulta_Correios-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page