Open AckslD opened 3 years ago
I'm just starting to use schema and was wondering if, given a schema, it is possible to generate a subclass of TypedDict to be used in type annotations?
TypedDict
For example if I would have
schema = Schema({'foo': [str], 'bar': {int, float}})
can I get the equivalent of
from typing import TypingDict class SchemaType(TypingDict): foo: List[str] bar: Set[Union[int, float]]
without having to effectively write out the schema again?
I'm just starting to use schema and was wondering if, given a schema, it is possible to generate a subclass of
TypedDict
to be used in type annotations?For example if I would have
can I get the equivalent of
without having to effectively write out the schema again?