I have a dictionary were the keys are dictionaries encoded in bytestrings:
mydict = {
b'{"key 1": 3, "key 2": 6}': 'my first value',
b'{"key 1": 2, "key 2": 7}': 'my second value',
}
And I would like to know how to write the type hint.
In my head it would make sense something like:
from typing import Dict, ByteString
mydict: Dict[ByteString[Dict[str, int]], str] = {
b'{"key 1": 3, "key 2": 6}': 'my first value',
b'{"key 1": 2, "key 2": 7}': 'my second value',
}
But I get TypeError: typing.ByteString is not a generic class
Any suggestion?