Redis

redis-py · database, redis-client, async, connection-pool, protocol-implementation

Async Redis client implementing the Redis protocol, providing a Python interface to all Redis commands and managing connections via pools or single connections.

class Redis(
    AbstractRedis, AsyncRedisModuleCommands, AsyncCoreCommands, AsyncSentinelCommands
):
    """
    Implementation of the Redis protocol.

    This abstract class provides a Python interface to all Redis commands
    and an implementation of the Redis protocol.

    Pipelines derive from this, implementing how
    the commands are sent and received to the Redis server. Based on
    configuration, an instance will either use a ConnectionPool, or
    Connection object to talk to redis.
    """

    # Type discrimination marker for @overload self-type pattern
    _is_async_client: Literal[True] = True

    response_callbacks: MutableMapping[Union[str, bytes], ResponseCallbackT]

    @classmethod
    def from_url(
        cls: Type["Redis"],
        url: str,
        single_conne

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key