Async OpenWeatherMap API!
Project description
aioowm - Easy Async library for working with OpenWeatherMap
Что нужно, чтобы пользоваться библиотекой:
PyCharm
OpenWeatherMap Token
Установка:
pip install aioowm
pip install -U https://github.com/vladislavkovalskyi/aioowm/archive/master.zip
Ссылки:
Пример:
from asyncio import run from aioowm import OWM weather = OWM(token="OpenWeatherMap Token", language="ru") async def app(): result = await weather.get("Saint Petersburg") print( f"Город: {result.city.name} ({result.city.country})\n" f"Температура: {result.weather.temperature.now}°C\n" f"Описание: {result.weather.description}\n" f"Скорость ветра: {result.weather.wind.speed} м/с" ) run(app())Вывод:
Город: Санкт-Петербург (RU) Температура: 2.12°C Описание: Облачно Скорость ветра: 1.34 м/с
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioowm-2.0.1.tar.gz
(7.0 kB
view hashes)
Built Distribution
aioowm-2.0.1-py3-none-any.whl
(8.2 kB
view hashes)