api: implement ccu querying

This commit is contained in:
lilly 2026-05-09 21:16:43 +02:00
commit c1a78e4dc9
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
6 changed files with 628 additions and 22 deletions

View file

@ -7,6 +7,7 @@ from simple_openid_connect.client import OpenidClient
from cachetools import Cache
from dooris_api import models, exceptions
from dooris_api.ccujack import CCUJackClient
logger = logging.getLogger(__name__)
@ -77,3 +78,10 @@ def get_cache(req: Request) -> Cache:
Cache = Annotated[Cache, Depends(get_cache)]
def get_ccujack(req: Request) -> CCUJackClient:
return req.app.extra["ccujack"]
CCUJackClient = Annotated[CCUJackClient, Depends(get_ccujack)]