Isn't this supported by typing.SupportsIndex? https://docs.python.org/3/library/typing.html#typing.Support...
Mind you, I haven't used it before, but it feels very similar to the abstract Mapping types.
Mind you, I haven't used it before, but it feels very similar to the abstract Mapping types.