treescope.repr_lib

treescope.repr_lib#

Stable high-level interface for building object reprs.

These functions simplify the process of implmenting __treescope_repr__ for custom types, allowing them to integrate with treescope. This interface will be stable across treescope releases, and may be expanded in the future to support additional customization.

Functions

render_dictionary_wrapper(object_type, ...)

Renders an object in "wrapped dictionary format".

render_enumlike_item(object_type, item_name, ...)

Renders a value of an enum-like type (e.g. like enum.Enum).

render_object_constructor(object_type, ...)

Renders an object in "constructor format", similar to a dataclass.