11 lines
349 B
Python
11 lines
349 B
Python
# noinspection PyUnresolvedReferences,PyProtectedMember
|
|
from typing import Annotated
|
|
|
|
from fastapi import Depends
|
|
from redis import asyncio as aioredis
|
|
|
|
from pssecret.settings import Settings, get_settings
|
|
|
|
|
|
def get_redis(settings: Annotated[Settings, Depends(get_settings)]) -> aioredis.Redis:
|
|
return aioredis.from_url(str(settings.redis_url))
|