0
I work a lot with nested formats like JSON and YAML, that have dicts and lists so wrote this utility.
from typing import Any, Hashable, Iterable, Protocol, TypeVar, runtime_checkable
T = TypeVar("T")
K = TypeVar("K", bound=Hashable)
@runtime_checkable
class SupportsGetItem(Protocol[K, T]):
...