import locale
import python_weather
from aiogram import Bot, Dispatcher, executor, types
locale.setlocale(locale.LC_ALL, "RUS")
bot = Bot(token=".....................................................")
dp = Dispatcher(bot)
async def getweather():
async with python_weather.Client(format=python_weather.IMPERIAL) as client:
@dp.message_handler()
async def echo(message: types.Message):
weather = await client.find(message.text)
celsius = round((weather.current.temperature - 32) / 1.8)
resp_msg = f"Текущая температура: {celsius}℃\n"
resp_msg += f"Осадки: {weather.current.precipitation}\n"
resp_msg += f"Скорость ветра {weather.current.wind_speed}\n"
await message.answer(resp_msg)
if __name__ == "__main__":
executor.start_polling(dp, skip_updates=True)