TypedDict describes a dict with a fixed set of typed keys
Answer: TypedDict is a special construct to add type hints to a dictionary. Each key is associated with a value of a consistent type. At runtime TypedDict instances are simply dicts. TypedDict declares a dictionary type with a certain set of keys. This expectation is not checked at runtime but is only enforced by type checkers.
PEP 589
This PEP proposes a type constructor typing.TypedDict. It supports a dictionary object that has a specific set of string keys. Each of those keys has a value of a specific type. The example movie dict has 'name': 'Blade Runner' and 'year': 1982. A common form is class Point2D(TypedDict) with fields such as x: int.
See also
Claims
- id: C1 claim: TypedDict is a special construct to add type hints to a dictionary. source: S1 evidence: "Special construct to add type hints to a dictionary."
- id: C2 claim: The expectation is not checked at runtime. source: S1 evidence: "This expectation"
- id: C3 claim: PEP 589 proposes typing.TypedDict for dicts with a specific set of keys. source: S2 evidence: "This PEP proposes a type constructor `
typing.TypedDict` to"
- id: C4 claim: The PEP uses a movie dict with name and year as an example. source: S2 evidence: "'name': 'Blade Runner'"
Sources
- [S1] typing.TypedDict. Python docs. https://docs.python.org/3/library/typing.html . License: PSF-2.0. Accessed 2026-11-16.
- [S2] PEP 589 – TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys. Python PEPs. https://peps.python.org/pep-0589/ . License: Public domain or CC0-1.0. Accessed 2026-11-16.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python docs, typing.TypedDict, PSF-2.0 (https://docs.python.org/3/license.html); Python PEPs, PEP 589 – TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys, Public domain or CC0-1.0 (https://peps.python.org/pep-0589/ (Copyright section: public domain)). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Python docs, typing.TypedDict, PSF-2.0 (https://docs.python.org/3/license.html); Python PEPs, PEP 589 – TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys, Public domain or CC0-1.0 (https://peps.python.org/pep-0589/ (Copyright section: public domain)).
Cite this
iinventedlight. 2026. "TypedDict describes a dict with a fixed set of typed keys." iinventedlight Library, iil:note:mpsnc99n, version of 2026-11-16. https://iinventedlight.com/library/notes/python-typeddict/. License: CC-BY-4.0.
@misc{iil_note_mpsnc99n,
author = {{iinventedlight}},
title = {{TypedDict describes a dict with a fixed set of typed keys}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-16},
url = {https://iinventedlight.com/library/notes/python-typeddict/},
note = {Permanent ID iil:note:mpsnc99n. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-typeddict.md.