Segments are how we define an event location in the SensiML Toolkit. They contain the start and end location of the event and the Label for the event


from sensiml.datamanager.segment import Segment, SegmentSet

# to see a list of segments associated with a capture
segment_set = SegmentSet(client._connection, client._project, capture)

# To create a new segment
segment = Segment(client._connection, project, capture, segmenter, label, label_value)
segment.sample_start = 100
segment.sample_end = 1000
class sensiml.datamanager.segment.Segment(connection, project, capture, segmenter=None, label=None, label_value=None)

Base class for a label object.


Calls the REST API and deletes the object from the server.


Calls the REST API and inserts a metadata object onto the server using the local object’s properties.


Calls the REST API and populates the local object’s properties from the server.

property sample_end

The index of the last sample of the label

property sample_start

The index of the first sample of the label

property segmenter

The index of the last sample of the label


Calls the REST API and updates the object on the server.

property uuid

Auto generated unique identifier for the metadata object

class sensiml.datamanager.segment.SegmentSet(connection, project, capture, initialize_set=True)

Base class for a collection of segments

property get_set_url

replace this with the url to call to pull down the set objects