Comments (2)
O exemplo da documentação funciona pra mim:
import requests
url = "https://www.cepaberto.com/api/v3/cep?cep=01001000"
headers = {'Authorization': 'Token token=<token>'}
response = requests.get(url, headers=headers)
print(response.json())
{'altitude': 760.0, 'cep': '01001000', 'latitude': '-23.5479099981', 'longitude': '-46.636', 'logradouro': 'Praça da Sé', 'bairro': 'Sé', 'complemento': '- lado ímpar', 'cidade': {'ddd': 11, 'ibge': '3550308', 'nome': 'São Paulo'}, 'estado': {'sigla': 'SP'}}
from cepaberto-api-examples.
Re-abra caso não ainda não funcione.
from cepaberto-api-examples.
Related Issues (17)
- Convert V2 snippets to V3
- Como fazer download? HOT 5
- item duplicado nas cidades
- OPTIONS http://www.cepaberto.com/api/v3/cep?cep=29040040 404 (Not Found) HOT 5
- Erro esporádico ao buscar cidades com caracteres acentuados HOT 5
- Busca de Latitude e Longitude HOT 1
- Get por latitude e longitude
- Exemplo de uso da API do CEP Aberto em PHP HOT 1
- Erro de Certificado inválido ao consumir API com aplicação publicada na AWS (EBS) HOT 3
- React + cors
- Cadastrar/Atualizar CEP: 35500-000 HOT 1
- SSL certificate problem
- A pesquisa de cidade e estado para achar o CEP não funciona HOT 19
- nao consigo usar com postman HOT 3
- Erro 400 HOT 1
- Erro busca CEP inválido
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cepaberto-api-examples.