pylabrobot.opentrons.OT2#

class pylabrobot.opentrons.OT2(host: str, port: int = 31950, deck: OTDeck | None = None, traversal_height: float = 120, command_timeout: float = 30, command_poll_interval: float = 0.05, io: HTTP | None = None)#

Bases: object

Opentrons OT-2 controlled through its robot-server HTTP API.

connect() opens the transport for queries. setup() also creates a run, binds mounted pipettes, and optionally homes the robot. Physical operations are exposed on left_pipette and right_pipette.

Attributes

pipettes

Mounted pipettes, left first.

software_version

Software version used to configure the active run, or None before setup.

Methods

__init__(host[, port, deck, ...])

connect()

Open the transport for queries, without creating a run or moving the robot.

get_health()

Return a fresh health reading without changing device or run state.

get_mounted_pipettes()

Read physical pipette identities without loading or replacing pipette objects.

get_runs()

Read server runs without selecting, stopping, or replacing the active run.

home()

Home the gantry and pipette axes.

list_connected_modules()

Read connected module identities without loading modules into the run.

setup([skip_home])

Connect, discover and bind pipettes to a run, and optionally home.

stop()

Stop the run and close the transport, retaining state if run shutdown fails.

Parameters:
  • host (str)

  • port (int)

  • deck (OTDeck | None)

  • traversal_height (float)

  • command_timeout (float)

  • command_poll_interval (float)

  • io (HTTP | None)