roboto.experimental.sessions.operations#

Module Contents#

class roboto.experimental.sessions.operations.AddFilesRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/sessions/id/<session_id>/files.

Adds one or more files as contributions to the session.

Parameters:

data (Any)

files: list[SessionFile]#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class roboto.experimental.sessions.operations.AttachToDeviceRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/sessions/id/<session_id>/devices.

Attaches a device as a subject of the session.

Parameters:

data (Any)

device_id: str#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class roboto.experimental.sessions.operations.CreateSessionRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/sessions.

Creates a new session with zero, one, or many devices attached as subjects.

Parameters:

data (Any)

custom_fields: dict[str, Any] | None = None#

Initial values for Ready custom fields on this session.

Each key must be the name of a CustomField that is Ready for the caller’s org and the Session entity type; each value must satisfy the field’s declared type. Names that are undefined or not Ready, and values that don’t match the field’s type, are rejected with a structured error.

description: str | None = None#

Optional description of the Session.

device_ids: list[str] = None#
metadata: dict[str, Any] = None#

Key-value metadata to associate with the Session.

Sessions cannot be filtered or sorted by metadata keys; for queryable structured attributes, define a custom field on the Session entity type.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None = None#
tags: list[str] = None#

Tags to associate with the Session.

class roboto.experimental.sessions.operations.DetachFromDeviceRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for DELETE /v1/sessions/id/<session_id>/devices.

Detaches a device from the session; the session itself is not deleted.

Parameters:

data (Any)

device_id: str#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class roboto.experimental.sessions.operations.RemoveFilesRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for DELETE /v1/sessions/id/<session_id>/files.

Removes the listed files’ contributions from the session.

Parameters:

data (Any)

file_ids: list[str]#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class roboto.experimental.sessions.operations.SessionFile(/, **data)#

Bases: pydantic.BaseModel

A file’s contribution to a session, optionally narrowed by a time window, a data range, or both.

The two are validated separately; setting one neither requires nor constrains the other.

Time window (range_min_timestamp_ns and range_max_timestamp_ns):

  • Values are nanoseconds since the Unix epoch, measured the same way as the session’s own time bounds.

  • Set both or set neither; a window with only one bound is rejected.

  • The window is the closed interval [range_min_timestamp_ns, range_max_timestamp_ns]; both endpoints are included. Leaving both unset contributes the file’s whole time window.

Data range (data_range):

  • Use when one file is shared by several sessions (for example, a LeRobot v3 data file).

  • (start, end): start is the first covered position; end is one past the last. Values are in the file’s own units — stored-row positions (counted from 0) for tabular files, nanoseconds of media time for video.

  • Leaving it unset covers the whole file.

  • The range admits topic partitions (the stored pieces of the file’s individual data streams) one at a time: a topic’s partition of the file is admitted only when its positions sit entirely inside the range, so a session with several topics in the file has each partition admitted independently. The range does not cut into a partition, and a partition extending past either end of the range is not admitted.

Parameters:

data (Any)

data_range: tuple[int, int] | None = None#
file_id: str#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

range_max_timestamp_ns: int | None = None#
range_min_timestamp_ns: int | None = None#
class roboto.experimental.sessions.operations.SessionUpdate(/, **data)#

Bases: pydantic.BaseModel

Partial update for a session.

Fields left at NotSet are not modified.

Parameters:

data (Any)

custom_fields_changeset: roboto.updates.CustomFieldChangeset | None = None#

Changes to apply to Ready custom-field values on this session.

Each referenced field name must be a Ready custom field for this session’s org and the Session entity type; each set_fields value must satisfy the field’s declared type. Names that are undefined or not Ready are rejected with a structured error. Field names not mentioned by the changeset are left unchanged.

description: str | roboto.sentinels.NotSetType | None#

New description for the Session. Set to None to clear the description.

metadata_changeset: roboto.updates.MetadataChangeset | roboto.sentinels.NotSetType#

Tag and metadata changes to merge into the Session (add, update, or remove fields and tags).

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, pydantic.StringConstraints(max_length=120)] | roboto.sentinels.NotSetType | None#

New name for the Session (max 120 characters). Set to None to clear the name.