pylabrobot.opentrons.flex.Flex#
- class pylabrobot.opentrons.flex.Flex(host: str, port: int = 31950, deck: FlexDeck | None = None, io: HTTP | None = None, command_timeout: float = 30.0, command_poll_interval: float = 0.05)#
Bases:
objectOpentrons Flex liquid handler, over the robot-server HTTP API.
A device shell composed on the shared
pylabrobot.io.HTTPtransport (OpentronsAPI+ a run-scopedOpentronsRun): it owns the deck, deck-scoped labware loading, and the discover-then-compose lifecycle that builds mount-addressed head sub-objects (left/right/head96). Liquid-handling ops live on the heads, not here — seepylabrobot.opentrons.flex.flex_head.connect()opens the transport for health/discovery queries;setup()also creates a run, homes, and composes the heads.Attributes
Pipette on the left mount, also available as
left.Mounted pipettes in discovery order, including a 96-channel head.
Pipette on the right mount, also available as
right.Robot software version read at connection time.
Minimum tip/nozzle Z for travel, above the tallest modeled labware.
Methods
__init__(host[, port, deck, io, ...])add_comment(message)Record
messagein the run's command log; the robot does nothing else with it.attach_deck(deck)Replace the deck before setup or after stopping the active run.
End the control session, handing the robot back to its own touchscreen.
connect()Open the link and confirm the robot answers.
Start a control session.
Drop the link, moving nothing.
Read fresh robot health without creating a run.
Read physical instruments before setup, without loading them into a run.
get_runs()Read server runs without selecting or stopping them.
home()Home all axes.
Discover what is mounted and compose the heads.
labware_moved_off_deck(resource)Tell the robot an EXTERNAL agent (human or lab transporter) removed labware.
Read module identities without loading them into a run.
move_axes_relative(axis_map[, speed])Jog the named axes by distances (mm) from where they are, returning where they land.
move_axes_to(axis_map[, critical_point, speed])Move the named axes to absolute deck-frame positions (mm), returning where they land.
reload_labware(resource)Re-read the labware's position after a human moved it in its own slot.
retract_axis(axis)Retract
axisto its home position, clearing the deck below it.send_command(command_type[, params, wait, ...])Send any robot command by name, for the parts of the robot this class does not wrap.
set_rail_lights(on)Turn the deck rail lights on or off.
set_status_bar(animation)Play a built-in light-bar animation: "idle", "confirm", "updating", "disco" or "off".
setup([skip_home])Bring the robot fully up, PyLabRobot's usual one-call lifecycle entry.
stop()Park the gantry and release the robot, dropping any mounted tips first.
sync_tips_to_robot(tip_rack)Make the robot's tip-rack model agree with PyLabRobot's.
wait_for_duration(seconds)Hold the run for
secondsbefore the next command runs.