Python library to query brazilian CEP (brazilian zip codes) data
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 = 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
Hashes for brazilcep-6.0.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5262b5fb8b23145be6bb035fd1d94df066fa90db067c27873f06d0a1e7f988fb |
|
MD5 | 7632d0e6378a45092f808db3cc926003 |
|
BLAKE2b-256 | 0236a25f1a195fe9ae784e2387752640c915195bf1884a03b96a52630f49cc9d |