From bcafac3766709cf3ca7de6cc382ba5c8cd9239fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=B1?= =?UTF-8?q?=D0=B4=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2?= <565963@gmail.com> Date: Mon, 9 Sep 2024 12:37:28 +0300 Subject: [PATCH] refactor: new weather metrics --- README.md | 1 + main.sh | 2 ++ src/weather.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e69de29..4b37f7c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +# Как не стоит кодить на Python \ No newline at end of file diff --git a/main.sh b/main.sh index 11878b4..f0a3284 100755 --- a/main.sh +++ b/main.sh @@ -1 +1,3 @@ +#!/bin/bash + curl localhost:8000 > data.out \ No newline at end of file diff --git a/src/weather.py b/src/weather.py index 6746b13..0769767 100644 --- a/src/weather.py +++ b/src/weather.py @@ -10,7 +10,7 @@ def weather_handler(date: str): + str(coordinates[0]) + "&longitude=" + str(coordinates[1]) - + "¤t=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m" + + "¤t=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() return raw_data \ No newline at end of file