ducpy.serialize.serialize_binary_files ====================================== .. py:module:: ducpy.serialize.serialize_binary_files Functions --------- .. autoapisummary:: ducpy.serialize.serialize_binary_files.create_binary_file_data_dict ducpy.serialize.serialize_binary_files.create_binary_files_dict_from_list ducpy.serialize.serialize_binary_files.get_attribute ducpy.serialize.serialize_binary_files.serialize_binary_files Module Contents --------------- .. py:function:: create_binary_file_data_dict(mime_type: str, image_id: str, image_bytes: bytes, timestamp_ms: int) -> Dict[str, ducpy.classes.BinaryFilesClass.BinaryFiles] Creates a dictionary representing the data for a single binary file. This dictionary is suitable for use as a value in the main binary_files dictionary passed to serialize_binary_files. .. py:function:: create_binary_files_dict_from_list(files_data: List[Dict[str, ducpy.classes.BinaryFilesClass.BinaryFiles]]) -> Dict[str, Dict[str, ducpy.classes.BinaryFilesClass.BinaryFiles]] Creates the main binary_files dictionary from a list of file data dictionaries. Each item in the list should be a dictionary with keys: 'image_id', 'mime_type', 'image_bytes', 'timestamp_ms'. The 'image_id' will be used as the key in the output dictionary and for the 'id' field. .. py:function:: get_attribute(obj: Union[Dict, Any], attr: str, alt_attr: str = None) Safely get an attribute from an object or dictionary. .. py:function:: serialize_binary_files(builder: flatbuffers.Builder, binary_files: Dict[str, Union[Dict, ducpy.classes.BinaryFilesClass.BinaryFiles]]) -> int