MCPcopy Create free account
hub / github.com/fastapi-users/fastapi-users / set

Method set

tests/test_authentication_strategy_redis.py:25–29  ·  view source on GitHub ↗
(self, key: str, value: str, ex: int | None = None)

Source from the content-addressed store, hash-verified

23 return value
24
25 async def set(self, key: str, value: str, ex: int | None = None):
26 expiration = None
27 if ex is not None:
28 expiration = int(datetime.now().timestamp() + ex)
29 self.store[key] = (value, expiration)
30
31 async def delete(self, key: str):
32 try:

Calls

no outgoing calls

Tested by

no test coverage detected