compas_pb.core
¤
Functions:¤
any_from_pb
¤
Convert a protobuf message to a supported object.
Parameters:
-
proto_data(:class: `compas_pb.generated.message_pb2.AnyData`) –The protobuf message type of AnyData.
Returns:
any_to_pb
¤
deserialize_message
¤
deserialize_message_bts
¤
Deserialize a binary data into bytes string.
Parameters:
-
binary_data(bytes) –The binary data to be deserialized.
Returns:
-
message_data(MessageData) –The protobuf message data.
deserialize_message_from_json
¤
primitive_from_pb
¤
primitive_to_pb
¤
Convert a python native type to a protobuf message.
Parameters:
-
obj(:class: `int`, `float`, `bool`, `str`, `bytes`) –The python native type to convert.
Returns:
-
class: `compas_pb.generated.message_pb2.AnyData`–The protobuf message type of AnyData.
serialize_message
¤
Serialize a top-level protobuf message.
Parameters:
-
data(object) –The data to be serialized. This can be a COMPAS object, a list of objects, or a dictionary.
Returns:
-
message(MessageData) –