pssecret-server/src/pssecret/utils.py
Ivan Golikov d5fe39f2cc Rename project to pssecret
Update of pre-commit configuration
2024-12-25 12:40:57 +01:00

11 lines
213 B
Python

from uuid import uuid4
from pssecret.redis_db import redis
async def get_new_key() -> str:
while True:
new_key = str(uuid4())
if not await redis.exists(new_key):
return new_key