roboto.domain.topics.topic_schema
Module Contents
TopicSchema
Describes the field structure of a topic’s messages.
A topic schema is identified by a name (e.g., "sensor_msgs/Imu") and a content-based checksum deterministically derived from its fields. Schemas are deduplicated within an organization: topics whose fields share the same names, paths, and data types reference the same schema.
Use from_id() when you already know the schema_id. Topic.get_schema() retrieves the schema associated with a specific topic.
Usage
Retrieve a schema and inspect its fields:
from roboto.domain.topics import TopicSchema
schema = TopicSchema.from_id("ts_abc123")
print(schema.name, schema.checksum)
for field in schema.fields:
print(field.path_in_schema, field.data_type)Parameters
fields list[roboto.roboto_client roboto.Properties
TopicSchema.fields
Field definitions belonging to this schema.
TopicSchema.from_id()
Retrieve a schema by its ID.
Parameters
schema_id strUnique identifier of the schema to retrieve.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
A TopicSchema for the given schema_id.
Raises
No schema with this ID exists.
Usage
from roboto.domain.topics import TopicSchema
schema = TopicSchema.from_id("ts_abc123")
for field in schema.fields:
print(field.path_in_schema, field.data_type)Properties
TopicSchema.name
Informational label for the schema (e.g. "sensor_msgs/Imu"). Not part of identity; may be None.
TopicSchema.record
Underlying schema record.