CTY value output and formatting module.
Functions
pretty_print_cty
pretty_print_cty(value: CtyValue[Any]) -> None
Pretty print a CTY value to stdout.
Parameters:
| Name |
Type |
Description |
Default |
value
|
CtyValue[Any]
|
|
required
|
Example
from pyvider.cty import CtyString
val = CtyString().validate("test")
pretty_print_cty(val)
"test"
Source code in pyvider/hcl/output/formatting.py
| def pretty_print_cty(value: CtyValue[Any]) -> None:
"""Pretty print a CTY value to stdout.
Args:
value: CTY value to print
Example:
>>> from pyvider.cty import CtyString
>>> val = CtyString().validate("test")
>>> pretty_print_cty(val)
"test"
"""
print(_pretty_print_cty_recursive(value, 0))
|