Spaces:
Running
Running
Download src/utils/redis.py from ABAO77/Run_code_api: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/ABAO77/Run_code_api/resolve/0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/utils/redis.py
- Command line
-
hf download hf://spaces/ABAO77/Run_code_api@0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/utils/redis.py
-
curl -L -o redis.py https://huggingface.co/spaces/ABAO77/Run_code_api/resolve/0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/utils/redis.py
393 Bytes
| import redis.asyncio as redis | |
| # redis_client = redis.from_url( | |
| # RedisCfg.REDIS_URL, encoding="utf-8", decode_responses=True | |
| # ) | |
| async def set_key_redis(key, value, time=300): | |
| return None #redis_client.set(key, value, time) | |
| async def get_key_redis(key): | |
| return None #await redis_client.get(key) | |
| async def delete_key_redis(key): | |
| return None#redis_client.delete(key) | |