Python library to search brazilian CEP (brazilian zip codes)
Project description
BrazilCEP
Minimalist and easy-to-use python library designed to query CEP (brazilian zip codes) data.
About | Install | How to Use | Documentation Contribute Credits
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.
- Cross-platform: Windows, Mac, and Linux are officially supported.
- Works with Python 3.8, 3.9, 3.10 and 3.11.
- Currently supports several CEP API's:
BrazilCEP started as a personal study project and evolved into a serious and open source project that is used by many developers on a daily basis.
Install
The recommended way to get BrazilCEP is to install the latest stable release via pip:
$ pip install brazilcep
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 = requests.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
Hashes for brazilcep-6.0.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c95edce6233a67c194991cd1624106c5624340dede70f9095d7e7f35b40e866 |
|
MD5 | b4b0b444cd2c6f2a0dad95d3ce8dca0f |
|
BLAKE2b-256 | 40ba0f076442c5f97662f4d37a105d5e981d32e8b785b5e8db12334b4e4f5ef3 |