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