Minimalist and easy-to-use python library designed to query CEP (brazilian zip codes) data
Project description
BrazilCEP
About | Install | How to Use | Documentation | Contribute | Credits
About
BrazilCEP is a minimalist and easy-to-use python library designed to query CEP (brazilian zip codes) data.
Its objective is to provide a common query interface to all these search services, facilitating the integration of Python applications with these services.
Currently supports several CEP API's:
[!NOTE] BrazilCEP is the new name of former PyCEPCorreio python library. If you want to migrate the old code to the new version, please see the migrate section in docs.
Install
The recommended way to get BrazilCEP is to install the latest stable release via pip:
pip install brazilcep
[!NOTE] We currently support Python 3.8+ only. Users on older interpreter versions are urged to upgrade.
How to Use
Making a request is very simple. Begin by importing the BrazilCEP module:
>>> import brazilcep
Now, call the get_address_from_cep to query any CEP:
>>> address = brazilcep.get_address_from_cep('37503-130')
Now, we have a dict object called address. We can
get all the address information we need from this object:
>>> address
{
'district': 'rua abc',
'cep': '37503130',
'city': 'city ABC',
'street': 'str',
'uf': 'str',
'complement': 'str',
}
The CEP always must be a string.
Documentation
Documentation for the current version of BrazilCEP is available from the official docs here.
Contribute
See this guideline here.
Credits
Copyright (C) 2016-2023 by Michell Stuttgart
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brazilcep-6.3.0.tar.gz.
File metadata
- Download URL: brazilcep-6.3.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cbeef28aa9ada86ac30c2ed44ad1c36769a983db96a3f4f786d6b66de21bf99
|
|
| MD5 |
fb444b8448b9928664b29fcd96f6e9da
|
|
| BLAKE2b-256 |
d5948585ac130a5737d802d6e680142442680074fa238d2acac75461d7c448c4
|
File details
Details for the file brazilcep-6.3.0-py3-none-any.whl.
File metadata
- Download URL: brazilcep-6.3.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f7ddd0e36d135b1cf5bd8fa5ac1bfc0c97d1551402ab6304fa8010dbe7e6d0
|
|
| MD5 |
137515eb6304c4e2cccf3279557d7504
|
|
| BLAKE2b-256 |
0f56be82992af6a76af9ee80317de984fbf0265cf5f369a6d31592692abdc462
|