pssecret-server/pssecret/redis_db.py
Ivan Golikov 8266c95cd9 Integration tests (#3)
Reviewed-on: root/pssecret#3
Co-authored-by: Ivan Golikov <root@ivnglkv.me>
Co-committed-by: Ivan Golikov <root@ivnglkv.me>
2025-01-01 18:18:38 +00:00

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))