refactor: new weather metrics

This commit is contained in:
Дмитрий Абдрахманов 2024-09-09 12:37:28 +03:00
parent 833a6500b1
commit bcafac3766
3 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1 @@
# Как не стоит кодить на Python

View File

@ -1 +1,3 @@
#!/bin/bash
curl localhost:8000 > data.out curl localhost:8000 > data.out

View File

@ -10,7 +10,7 @@ def weather_handler(date: str):
+ str(coordinates[0]) + str(coordinates[0])
+ "&longitude=" + "&longitude="
+ str(coordinates[1]) + str(coordinates[1])
+ "&current=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m" + "&current=temperature_2m,relative_humidity_2m,rain,snowfall,weather_code,wind_speed_10m,wind_direction_10m&hourly=temperature_2m,relative_humidity_2m,rain,snowfall,weather_code,wind_speed_10m,wind_direction_10m&timezone=Europe/Moscow&forecast_days=3"
) )
raw_data = urllib.request.urlopen(url).read() raw_data = urllib.request.urlopen(url).read()
return raw_data return raw_data