mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-28 12:33:59 +03:00
13 lines
293 B
Python
13 lines
293 B
Python
|
"""Services module."""
|
||
|
|
||
|
from aioredis import Redis
|
||
|
|
||
|
|
||
|
class Service:
|
||
|
def __init__(self, redis: Redis) -> None:
|
||
|
self._redis = redis
|
||
|
|
||
|
async def process(self) -> str:
|
||
|
await self._redis.set('my-key', 'value')
|
||
|
return await self._redis.get('my-key', encoding='utf-8')
|