Index
🤖 AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
pyvider.cty.types
¶
Attributes¶
BytesCapsule
module-attribute
¶
A capsule type for wrapping raw bytes.
Classes¶
CtyCapsule
¶
Represents a capsule type in the Cty type system. Capsule types are opaque types that can be used to wrap arbitrary Python objects.
Source code in pyvider/cty/types/capsule.py
CtyCapsuleWithOps
¶
CtyCapsuleWithOps(
capsule_name: str,
py_type: type,
*,
equal_fn: Callable[[Any, Any], bool] | None = None,
hash_fn: Callable[[Any], int] | None = None,
convert_fn: Callable[
[Any, CtyType[Any]], CtyValue[Any] | None
]
| None = None,
)
Bases: CtyCapsule
A CtyCapsule that supports custom operations like equality, hashing, and conversion.
Initializes a CtyCapsule with custom operational functions.
Source code in pyvider/cty/types/capsule.py
Functions¶
CtyDynamic
¶
Represents a dynamic type that can hold any CtyValue.
Functions¶
validate
¶
Validates a raw Python value for a dynamic type. The result is always a CtyValue of type CtyDynamic, which wraps the inferred concrete value.
Source code in pyvider/cty/types/structural/dynamic.py
CtyType
¶
Bases: CtyTypeProtocol[T], Generic[T], ABC
Generic abstract base class for all Cty types.