Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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 (Postal Address Code) 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.
[!TIP] CEP or Código de Endereçamento Postal (Postal Address Code), as it is also known, is a system of numeric codes, created, maintained and organized by Correios do Brazil for organizing addresses and deliveries of letters and parcels.
The recommended way to get BrazilCEP is to install the latest stable release via pip:
pip install brazilcep
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.
[!TIP] BrazilCEP was developed to integrate on-demand queries into web pages. Querying CEP in bulk through scripts or any other means is not recommended.
[!IMPORTANT] BrazilCEP is not responsible for the functioning, availability and support of any of these query API's. All of them are provided by third parties, and this library just provides a handy way to centralize the CEP search on these services.
Documentation for the current version of BrazilCEP is available here.
See this guideline here.
Copyright (C) 2016-2024 by Michell Stuttgart
FAQs
Minimalist and easy-to-use python library designed to query CEP (brazilian zip codes) data
We found that brazilcep demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.