Skip to content

Commit

Permalink
hi
Browse files Browse the repository at this point in the history
  • Loading branch information
dycw committed Sep 16, 2024
1 parent f9365a2 commit 764df13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utilities/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def get(
decode_responses: bool = False,
**kwargs: Any,
) -> _T | None:
"""Get a value from `redis`."""
from utilities.orjson import deserialize

with yield_client(
Expand Down Expand Up @@ -95,6 +96,7 @@ def set(
decode_responses: bool = False,
**kwargs: Any,
) -> ResponseT:
"""Set a value in `redis`."""
from utilities.orjson import serialize

ser = serialize(value)
Expand All @@ -120,6 +122,7 @@ async def get_async(
decode_responses: bool = False,
**kwargs: Any,
) -> _T | None:
"""Get a value from `redis` asynchronously."""
from utilities.orjson import deserialize

async with yield_client_async(
Expand Down Expand Up @@ -147,6 +150,7 @@ async def set_async(
decode_responses: bool = False,
**kwargs: Any,
) -> ResponseT:
"""Set a value in `redis` asynchronously."""
from utilities.orjson import serialize

ser = serialize(value)
Expand Down

0 comments on commit 764df13

Please sign in to comment.