Enum Module¶
mosaicolabs.enum.SerializationFormat ¶
Bases: StrEnum
Defines the structural format used when serializing ontology data for storage or transmission.
The format dictates how the data is organized (e.g., fixed-schema tables vs. variable-length structures) and may imply specific handling during the serialization and deserialization process.
Default
class-attribute
instance-attribute
¶
Represents data that conforms to a strict, fixed-width tabular format (like a standard DataFrame or a PyArrow Table of records). Suitable for simple sensors with a constant number of fields and fixed-size data.
Ragged
class-attribute
instance-attribute
¶
Represents data containing variable-length lists or sequences (e.g., point clouds, lists of detections, or non-uniform arrays). This format is typically serialized using specialized PyArrow features to handle the non-uniform structure efficiently.
Image
class-attribute
instance-attribute
¶
Represents raw or compressed image data. This format signals that the data consists primarily of a binary blob (the image content) along with associated metadata (width, height, format), often requiring specialized compression/decompression handling.
mosaicolabs.enum.SequenceStatus ¶
Bases: Enum
Represents the operational lifecycle state of a Sequence during the ingestion process
(see also SequenceWriter).
This enumeration tracks the state of a sequence from its initial creation through data writing until it reaches a terminal state (Finalized or Error).
Null
class-attribute
instance-attribute
¶
The initial state of a writer before server-side registration.
In this state, the local SequenceWriter instance
has been created but the SEQUENCE_CREATE handshake has not yet been performed
or completed.
Pending
class-attribute
instance-attribute
¶
The sequence is registered on the server and actively accepting data.
This state is entered upon successful execution of the __enter__ method
of the SequenceWriter class.
While pending, the sequence allows for the
creation of new topics and the ingestion of data batches.
Finalized
class-attribute
instance-attribute
¶
The sequence has been successfully closed and its data is now immutable.
This terminal state indicates that the SequenceWriter._finalize()
action was acknowledged by the server. Once finalized,
the sequence is typically locked and cannot be deleted unless explicitly
unlocked by an administrator.
Error
class-attribute
instance-attribute
¶
The ingestion process failed or was explicitly aborted.
This state is reached if an exception occurs within the with block or during
the finalization phase. Depending on the
OnErrorPolicy, the data may have been
purged (Delete) or retained in an unlocked state for debugging (Report).
mosaicolabs.enum.OnErrorPolicy ¶
Bases: Enum
Defines the behavior of the SequenceWriter
when an exception occurs during ingestion.
This policy determines how the platform handles partially uploaded data if the ingestion process is interrupted or fails.
Report
class-attribute
instance-attribute
¶
Notify the server of the error but retain partial data.
The system will attempt to finalize the sequence and notify the server of the specific failure, allowing existing data chunks to remain accessible for inspection.
Lock Status
Unlike standard successful finalization, a sequence finalized via a
Report policy is not placed in a locked state.
This means the sequence remains mutable at a system level and can be
deleted in a later moment once debugging or triage is complete.
Delete
class-attribute
instance-attribute
¶
Abort the sequence and instruct the server to discard all data.
This is the default "all-or-nothing" strategy. If a failure occurs, the
SequenceWriter will send an abort
command to ensure the server purges all traces of the failed ingestion,
preventing inconsistent or incomplete sequences from appearing in the
catalog.
mosaicolabs.enum.FlightAction ¶
Bases: StrEnum
Internal enumeration of PyArrow Flight action identifiers.
This enum serves as the single source of truth for all action names used in the handshakes between the SDK and the Mosaico server.
Internal Use Only
This class is part of the internal communication protocol. End-users
should never need to use these identifiers directly, as they are
abstracted by the public methods in MosaicoClient,
SequenceWriter, and
TopicWriter.
SEQUENCE_CREATE
class-attribute
instance-attribute
¶
Initiates the registration of a new sequence on the server.
SEQUENCE_FINALIZE
class-attribute
instance-attribute
¶
Marks a sequence as complete and makes its data immutable.
SEQUENCE_NOTIFY_CREATE
class-attribute
instance-attribute
¶
Sends asynchronous notifications or error reports during the sequence creation phase.
SEQUENCE_NOTIFY_LIST
class-attribute
instance-attribute
¶
Request the list of notifications for a specific sequence
SEQUENCE_NOTIFY_PURGE
class-attribute
instance-attribute
¶
Request the deletion of the list of notifications for a specific sequence
SEQUENCE_SYSTEM_INFO
class-attribute
instance-attribute
¶
Requests physical diagnostics such as storage size and lock status for a sequence.
SEQUENCE_ABORT
class-attribute
instance-attribute
¶
Signals the server to stop an active ingestion and discard partial data.
SEQUENCE_DELETE
class-attribute
instance-attribute
¶
Requests the permanent removal of a sequence and all associated topics from the server.
TOPIC_CREATE
class-attribute
instance-attribute
¶
Registers a new topic within an existing sequence context.
TOPIC_NOTIFY_CREATE
class-attribute
instance-attribute
¶
Reports errors or status updates specific to an individual topic stream.
TOPIC_NOTIFY_LIST
class-attribute
instance-attribute
¶
Request the list of notifications for a specific topic in a sequence
TOPIC_NOTIFY_PURGE
class-attribute
instance-attribute
¶
Request the deletion of the list of notifications for a topic in a sequence
TOPIC_SYSTEM_INFO
class-attribute
instance-attribute
¶
Requests storage and chunk metadata for an individual topic.
TOPIC_DELETE
class-attribute
instance-attribute
¶
Requests the permanent removal of a specific topic from the platform.
QUERY
class-attribute
instance-attribute
¶
Commands a multi-layer search query against the platform.