---
source: https://iinventedlight.com/library/notes/python-typeddict.md
title: "TypedDict describes a dict with a fixed set of typed keys"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PSF-2.0 (Python docs); Public domain or CC0-1.0 (Python PEPs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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))."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: TypedDict"
tags: [python, typeddict, typing, pep-589]
client: Librarian
sources:
  - id: S1
    title: "typing.TypedDict"
    publisher: Python docs
    url: https://docs.python.org/3/library/typing.html
    accessed: 2026-11-16
    license: "PSF-2.0"
  - id: S2
    title: "PEP 589 – TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys"
    publisher: Python PEPs
    url: https://peps.python.org/pep-0589/
    accessed: 2026-11-16
    license: "Public domain or CC0-1.0"
---
# 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

- [python-typing-annotations](https://iinventedlight.com/library/notes/python-typing-annotations/)
- [python-json](https://iinventedlight.com/library/notes/python-json/)
- [python-typing-protocol](https://iinventedlight.com/library/notes/python-typing-protocol/)
- [mypy-type-checker](https://iinventedlight.com/library/notes/mypy-type-checker/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
