Examples¶
Pyvider.cty includes a comprehensive set of runnable examples that demonstrate all features.
Running Examples¶
All examples are located in the examples/ directory of the repository. You can run any example directly:
python examples/getting-started/quick-start.py
python examples/types/primitives.py
python examples/advanced/marks.py
Or run all examples at once:
Example Categories¶
Getting Started¶
- quick-start.py - The 5-minute quick start example
Type Examples¶
- primitives.py - String, Number, and Bool types
- collections.py - List, Map, and Set types
- structural.py - Object and Tuple types
- dynamic.py - Dynamic type usage
- capsule.py - Capsule types for opaque data
Advanced Examples¶
- marks.py - Attaching metadata to values
- functions.py - Using built-in functions
- serialization.py - MessagePack serialization
- path-navigation.py - Navigating nested structures
- terraform-interop.py - Working with Terraform types
Next Steps¶
After exploring the examples, check out:
- User Guide - Comprehensive documentation
- How-To Guides - Task-oriented guides
- API Reference - Complete API documentation