Skip to content

Tutorials

This section contains learning-oriented lessons that walk through complete examples from start to finish. Start here if you're new to typing-graph and want hands-on experience.

If you're new to typing-graph, follow these tutorials in order:

flowchart LR
    A[First inspection] --> B[Working with metadata]
    B --> C[Traversing type graphs]
    C --> D[Structured types]
    D --> E[Functions]
  1. Your first type inspection - Start here to learn the core concepts
  2. Working with metadata - Understand metadata extraction and queries
  3. Traversing type graphs - Use walk() to traverse and collect metadata
  4. Inspecting structured types - Work with dataclasses, TypedDict, and NamedTuple
  5. Inspecting functions - Analyze function signatures and parameters

All tutorials

Your first type inspection
Learn the fundamentals of type inspection, including how to use inspect_type(), understand type nodes, and access metadata.
Working with metadata
Learn how to create, query, and transform MetadataCollection instances for working with type annotation metadata.
Traversing type graphs
Build a constraint collector that uses walk() to traverse nested types and collect metadata from any depth.
Inspecting structured types
Explore dataclasses, TypedDict, and NamedTuple inspection to extract field definitions and their types.
Inspecting functions
Discover how to inspect function signatures, access parameter information, and work with return types.

After completing tutorials

Once you've finished the tutorials, you're ready to: