Python
Serializing
Overview
The serializing module in ducpy provides functions to convert Python objects into the duc file format. These functions transform structured Python objects back into the FlatBuffers binary format for storage or transmission.
Main Functions
Serialize to Duc File
The main function for serializing a complete duc file:
Serialize Individual Components
You can also serialize individual components of a duc file:
Serialize Duc Elements
Serialize App State
Serialize Binary Files
Input Data Structure
When serializing a duc file, you need to provide:
elements: A list ofDucElementUnionobjects representing all elements in the fileapp_state: AnAppStateobject containing application state informationfiles: ADucExternalFilesobject containing any binary files to embed in the duc file
Custom Serialization
For advanced use cases, you can create a custom serialization process:
Edit on GitHub
Last updated on