plotly
Classes:
-
FigureDumpArgs–Arguments for dumping a Plotly figure.
-
FigureLoadArgs–Arguments for loading a Plotly figure.
-
FigureSerializer–Serializer for Plotly figures.
Attributes:
-
figure_serializer–FigureSerializer with default settings.
figure_serializer
module-attribute
figure_serializer = FigureSerializer()
FigureSerializer with default settings.
FigureDumpArgs
Bases: TypedDict
Arguments for dumping a Plotly figure.
Attributes:
-
engine(str | None) –JSON encoder to use. Options include "json", "orjson", or "auto". Default is None.
-
pretty(bool) –Whether to pretty print the JSON representation (default False).
-
remove_uids(bool) –Whether to remove trace UIDs from the JSON representation (default True).
-
validate(bool) –Whether to validate the figure before serialization (default True).
engine
instance-attribute
engine: str | None
JSON encoder to use. Options include "json", "orjson", or "auto". Default is None.
pretty
instance-attribute
pretty: bool
Whether to pretty print the JSON representation (default False).
remove_uids
instance-attribute
remove_uids: bool
Whether to remove trace UIDs from the JSON representation (default True).
validate
instance-attribute
validate: bool
Whether to validate the figure before serialization (default True).
FigureLoadArgs
FigureSerializer
FigureSerializer(
*,
dump_args: FigureDumpArgs | None = None,
load_args: FigureLoadArgs | None = None
)
Bases: Serializer[Figure]
Serializer for Plotly figures.
Parameters:
-
(dump_argsFigureDumpArgs | None, default:None) –Arguments for dumping a Plotly figure.
-
(load_argsFigureLoadArgs | None, default:None) –Arguments for loading a Plotly figure.
Methods:
-
deserialize_config–Deserialize the configuration from a JSON string.
-
deserialize_data–Deserialize the given figure.
-
serialize_config–Serialize the configuration to a JSON string.
-
serialize_data–Serialize the given figure.
Attributes:
-
content_types(tuple[str, ...]) –The content types that the serializer uses.