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
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.0.0a2.tar.gz.
File metadata
- Download URL: brazilcep-6.0.0a2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-71-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10bd4cbf4ddc00a471299909ed58b9184c11df938de43a1f93929c59738209da
|
|
| MD5 |
347dd1dde15968de0c6464944802d08e
|
|
| BLAKE2b-256 |
8891198498b1c46575b51987905e0317d253218765e2a8dcf07b73f593b583ca
|
File details
Details for the file brazilcep-6.0.0a2-py3-none-any.whl.
File metadata
- Download URL: brazilcep-6.0.0a2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-71-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5262b5fb8b23145be6bb035fd1d94df066fa90db067c27873f06d0a1e7f988fb
|
|
| MD5 |
7632d0e6378a45092f808db3cc926003
|
|
| BLAKE2b-256 |
0236a25f1a195fe9ae784e2387752640c915195bf1884a03b96a52630f49cc9d
|