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
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 Distribution
Built Distribution
File details
Details for the file Consulta Correios-1.0.1.tar.gz
.
File metadata
- Download URL: Consulta Correios-1.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd43c163d8d91bc0e7551ed31aacb414fb9ffae051f3e2b50f4fbbd8e154778 |
|
MD5 | f3d656550aaacb776000ca975a51d5be |
|
BLAKE2b-256 | c9ea7d4e64977ff53550ed24454fdef73b04cb94ac9bb2e44c1d826997bd7ebf |
File details
Details for the file Consulta_Correios-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: Consulta_Correios-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff1827c02853e2d59ec003ddf107cc076996471588174095c10434170613aeb |
|
MD5 | 9498f59a1e7f256efd4faced1cce3124 |
|
BLAKE2b-256 | 14429afe9a5840c2252f03074e77725a634411cf97f1b61a6f8e714af1ebba2e |