-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b186a35
commit 64feb2f
Showing
8 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Changelog | ||
|
||
## 6.0.0 (2023-04-30) | ||
## 6.0.0 (2023-05-01) | ||
|
||
- Rename lib to BrazilCEP | ||
- Create new pip package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# How to Contribute | ||
# Contribute | ||
|
||
Contributions are welcome and greatly appreciated! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Migrate | ||
|
||
**BrazilCEP** is tne new name of former **PycepCorreios**. This page | ||
guide you on to process of migrate old code to new version. | ||
|
||
It's simples migrate te code and require minimal steps. | ||
|
||
## imports | ||
|
||
First, rename the `import` statements from: | ||
|
||
```python title="PyCEPCorreios" | ||
import pycepicorreios | ||
``` | ||
to | ||
|
||
```python title="BrazilCEP" | ||
import brazilcep | ||
``` | ||
|
||
## Query results | ||
|
||
The next step, is adjust the *keys* of query returned by `get_address_from_cep` function. | ||
|
||
The keys have simply been translated to english. Take a look on this old code: | ||
|
||
``` python title="PyCEPCorreios" | ||
>>> get_address_from_cep('37503-130') | ||
{ | ||
'bairro': 'rua abc', | ||
'cep': '37503130', | ||
'cidade': 'city ABC', | ||
'logradouro': 'str', | ||
'uf': 'str', | ||
'complemento': 'str', | ||
} | ||
``` | ||
This is the new code: | ||
|
||
``` python title="BrazilCEP" | ||
>>> get_address_from_cep('37503-130') | ||
{ | ||
'district': 'rua abc', | ||
'cep': '37503130', | ||
'city': 'city ABC', | ||
'street': 'str', | ||
'uf': 'str', | ||
'complement': 'str', | ||
} | ||
``` | ||
|
||
## Exceptions | ||
|
||
The follow Exceptions have been removed. | ||
|
||
```python | ||
exceptions.ConnectionError | ||
exceptions.Timeout | ||
exceptions.HTTPError | ||
exceptions.BaseException | ||
``` | ||
|
||
Please, use the [requests](https://requests.readthedocs.io/en/latest/user/quickstart/#errors-and-exceptions) exceptions instead. | ||
|
||
## Questions? | ||
|
||
The best way to send question is open a issue in **BrazilCEP** issue tracker [here](https://github.com/mstuttgart/brazilcep/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters