feat(schedule): implement multiple schedule providers

This commit is contained in:
2026-06-27 16:03:28 +03:00
parent 8b20eb1220
commit 29fe06462e
25 changed files with 1308 additions and 248 deletions
+2 -6
View File
@@ -2,12 +2,8 @@ from typing import Annotated
from fastapi import Depends
from gallery.easel.core import AppRequest
from gallery.sketch.weather.api import WeatherApi
from .api import api_resolver
async def get_weather_api(request: AppRequest, provider: str | None = None) -> WeatherApi:
return request.app.state.api.get_weather(provider)
WeatherApiDepends = Annotated[WeatherApi, Depends(get_weather_api)]
WeatherApiDepends = Annotated[WeatherApi, Depends(api_resolver(WeatherApi))]