mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
15 lines
269 B
Python
15 lines
269 B
Python
import redis.asyncio as redis
|
|
|
|
from app import config
|
|
|
|
|
|
global_settings = config.get_settings()
|
|
|
|
|
|
async def get_redis():
|
|
return await redis.from_url(
|
|
global_settings.redis_url.unicode_string(),
|
|
encoding="utf-8",
|
|
decode_responses=True,
|
|
)
|