mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-27 12:09:26 +02:00
Compare commits
2 commits
9af80b676b
...
fda9f74838
Author | SHA1 | Date | |
---|---|---|---|
fda9f74838 | |||
cb5a2c9076 |
4 changed files with 6 additions and 10 deletions
|
@ -12,7 +12,6 @@ from typing import Dict, List
|
|||
from zoneinfo import ZoneInfo
|
||||
|
||||
import aiohttp
|
||||
import async_timeout
|
||||
|
||||
from .pollen import PollenName, PollenLevel
|
||||
from .const import MAP_WARNING_ID_TO_SLUG as SLUG_MAP
|
||||
|
@ -125,7 +124,7 @@ class IrmKmiApiClient:
|
|||
headers['If-None-Match'] = self._cache[url]['etag']
|
||||
|
||||
try:
|
||||
async with async_timeout.timeout(60):
|
||||
async with asyncio.timeout(60):
|
||||
response = await self._session.request(
|
||||
method=method,
|
||||
url=url,
|
||||
|
|
|
@ -6,7 +6,6 @@ import datetime
|
|||
import logging
|
||||
from typing import List, Self
|
||||
|
||||
import async_timeout
|
||||
from svgwrite import Drawing
|
||||
from svgwrite.animate import Animate
|
||||
from svgwrite.container import FONT_TEMPLATE
|
||||
|
@ -186,7 +185,7 @@ class RainGraph:
|
|||
|
||||
for url in urls:
|
||||
coroutines.append(self._api_client.get_image(url))
|
||||
async with async_timeout.timeout(60):
|
||||
async with asyncio.timeout(60):
|
||||
images_from_api = await asyncio.gather(*coroutines)
|
||||
|
||||
_LOGGER.info(f"Just downloaded {len(images_from_api)} images")
|
||||
|
|
|
@ -16,9 +16,8 @@ classifiers = [
|
|||
]
|
||||
keywords = ["weather", "weather-api", "netherlands", "weather-forecast", "pollen", "belgium", "luxembourg", "rain-radar"]
|
||||
dependencies = [
|
||||
"aiohttp>=3.11.0",
|
||||
"async-timeout>=4.0.3",
|
||||
"svgwrite>=1.4.3",
|
||||
"aiohttp>=3.11.0,<4.0.0",
|
||||
"svgwrite>=1.4.3,<2.0.0",
|
||||
]
|
||||
requires-python = ">=3.12"
|
||||
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
aiohttp>=3.11.0
|
||||
async-timeout>=4.0.3
|
||||
svgwrite>=1.4.3
|
||||
aiohttp>=3.11.0,<4.0.0
|
||||
svgwrite>=1.4.3,<2.0.0
|
Loading…
Add table
Reference in a new issue