from typing import Protocol


class RedisLike(Protocol):
    def get(self, key: str) -> bytes | str | None: ...
    def set(self, key: str, value: bytes | str, ex: int | None = None) -> bool: ...
    def delete(self, *keys: str) -> int: ...
    def ping(self) -> bool: ...
    def close(self) -> None: ...
