API paraconsulta de endereços e CEP utilizando o site dos Correios
项目描述
咨询科雷奥斯
使用 Correios 网站(巴西邮政系统)查询地址和邮政编码的 API
要求
- Python 3.5+
- 美丽的汤4
- 要求
- 单解码
安装
可以使用 pip 安装 Consulta Correios:
$ pip install Consulta-Correios
如果要运行最新版本的代码,可以从 git 安装:
$ pip install -U git+git://github.com/arthurfortes/consulta_correios.git
快速入门和指南
此 API 允许通过同一个调用查询邮政编码和地址。请参阅下面的示例命令:
>>> import consulta_correios
>>> address = consulta_correios.busca_cep('Av. Júlio Prestes')
>>> print(address)
{'address': 'Avenida Julio Prestes', 'neighborhood': 'Taquaral', 'city/state': 'Campinas/SP', 'zipcode': '13076-001'}
>>> import consulta_correios
>>> address = consulta_correios.busca_cep('13076-001')
>>> print(address)
{'address': 'Avenida Julio Prestes', 'neighborhood': 'Taquaral', 'city/state': 'Campinas/SP', 'zipcode': '13076-001'}
贡献和问题
为了帮助项目做出贡献,请按照以下步骤操作:
-
Fork Consulta Correios
-
进行更改并提交
-
创建主题分支 - git checkout -b my_branch
-
推送到您的分支 - git push origin my_branch
-
从您的分支创建一个拉取请求。
-
您刚刚为 Consulta Correios 项目做出了贡献!
对于错误或反馈,请使用此链接:https ://github.com/arthurfortes/consulta_correios/issues
许可证(麻省理工学院)
© 2020. Consulta Correios All Rights Reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.