Skip to content

json commands with async redis: Redis.executed_command was never awaited #3812

@nikkicoon

Description

@nikkicoon

Are the JSONCommands only synchronous?
I'm trying to use json get and set from asynchronous functions in python 3.13.9.

I'm getting RuntimeWarning: coroutine 'Redis.execute_command' was never awaited for a call of

...
self.client.json().set(name=key, path=path, obj=data, decode_keys=decode_keys, nx=kwargs.get("nx", False))
...

where self.client is redis.asyncio.Redis or an asyncio Sentinel, depending on configuration.
direct commands like self.client.scan_iter and others work.
the above line can not awaited as far as I'm aware and what commands.json.commands.py indicates.

Do I have to implement my own json get and json set? I'm glad for any pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions