Skip to main content

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.

Release files for Consulta-Correios 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Consulta-Correios 1.0.1
File Size Uploaded
Consulta Correios-1.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Consulta-Correios 1.0.1
File Interpreter ABI Platform
Consulta_Correios-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / Consulta Correios-1.0.1.tar.gz

Download URL Consulta Correios-1.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cfd43c163d8d91bc0e7551ed31aacb414fb9ffae051f3e2b50f4fbbd8e154778
BLAKE2b-256 checksum
How to use checksums
c9ea7d4e64977ff53550ed24454fdef73b04cb94ac9bb2e44c1d826997bd7ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Release files / Consulta_Correios-1.0.1-py3-none-any.whl

Download URL Consulta_Correios-1.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ff1827c02853e2d59ec003ddf107cc076996471588174095c10434170613aeb
BLAKE2b-256 checksum
How to use checksums
14429afe9a5840c2252f03074e77725a634411cf97f1b61a6f8e714af1ebba2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page