total=Falseを指定したTypedDictで必須のキーを表す
Individual keys of a total=False TypedDict can be marked as required using Required:
It is also possible to mark all keys as non-required by default by specifying a totality of False:
「total=Falseはすべてのキーがnon-required」
code:ドキュメントの例.py
class Point2D(TypedDict, total=False):
label: str
RequiredはPython 3.11から可能