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.
Recommended learning path¶
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]
- Your first type inspection - Start here to learn the core concepts
- Working with metadata - Understand metadata extraction and queries
- Traversing type graphs - Use
walk()to traverse and collect metadata - Inspecting structured types - Work with dataclasses, TypedDict, and NamedTuple
- 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
MetadataCollectioninstances 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:
- Apply your knowledge with how-to guides for specific tasks
- Deepen understanding with explanations of concepts and architecture
- Look up details in the API reference