Acomodados packages para funcionar con gunicorn

This commit is contained in:
2020-11-19 03:15:09 -03:00
parent 5ff211c1db
commit 20c72e3af0
9 changed files with 7 additions and 7 deletions

13
home/services/weather.py Normal file
View File

@@ -0,0 +1,13 @@
import requests
url = "https://api.openweathermap.org/data/2.5/weather/"
def get(city, key):
data = {
'q': city,
'appid': key,
'units': 'metric',
}
response = requests.get(url, params=data)
return response.json()