https://github.com/sonalys/flask-api
API for gathering weather information and returning it to the user.
https://github.com/sonalys/flask-api
flask interview-test learning-by-doing
Last synced: about 2 months ago
JSON representation
API for gathering weather information and returning it to the user.
- Host: GitHub
- URL: https://github.com/sonalys/flask-api
- Owner: sonalys
- Created: 2020-12-11T18:02:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T18:02:54.000Z (over 5 years ago)
- Last Synced: 2025-10-13T13:35:59.779Z (8 months ago)
- Topics: flask, interview-test, learning-by-doing
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Requerimentos
## Bibliotecas
```
Python 3.7.0
Flask 1.1.1
Flask-RESTful 0.3.7
Flask-SQLAlchemy 2.4.1
SQLAlchemy 1.3.11
requests 2.22.0
```
## Arquivos de configuração
***Token de Acesso da API do ClimaTempo(config.py)***
```
token = "TOKEN_DE_ACESSO"
```
# Instalação
```
python3 -m venv env
. env/bin/activate
pip install -r requirements.txt
```
# Execução
```
python run.py
```
Roda em
```
localhost:5000
```
# Rotas
### ***/analise?data_inicial=yyyy-mm-dd&data_final=yyyy-mm-dd***
* Pesquisa a cidade com maior temperatura
* Devolve a média de precipitação por cidade
### ***/cidade?id=\***
* Cadastra a temperatura dos últimos 15 dias da cidade selecionada