Skip to main content

IvoryOS-compatible wrappers for PyLabRobot devices

Project description

plr-ivoryos

PyPI version

[!NOTE] This is a third-party integration package. It is not the official PyLabRobot library. For the official PyLabRobot repository, please visit PyLabRobot.

The native PyLabRobot experience, powered by IvoryOS.

plr-ivoryos provides IvoryOS-compatible UI wrappers for standard PyLabRobot classes. It allows you to build, simulate, and execute complex lab automation workflows using a visual interface, with no manual wrapper code required.

IvoryOS UI Screenshot


Quick Start (Simulation)

Develop and test your workflows with zero hardware. plr-ivoryos provides a built-in "headless" simulation mode that requires no configuration.

from plr_ivoryos import LiquidHandler, Scale

# Start with a default simulated deck and balance
lh = LiquidHandler(simulated=True)
scale = Scale(simulated=True)

if __name__ == "__main__":
    import ivoryos
    ivoryos.run(__name__)

Key Features

1. Native PLR Naming

Classes in plr-ivoryos use the exact same names as the original PyLabRobot classes (LiquidHandler, Scale, Pump, etc.). This makes the integration intuitive for PLR users while ensuring full compatibility with the IvoryOS ecosystem.

2. Smart Simulation Mode

Setting simulated=True on any device wrapper automatically selects a suitable mock backend. For the LiquidHandler, it also sets up a default Hamilton STARLet deck, allowing you to see interactive plate and well dropdowns in the IvoryOS UI immediately.

3. Dynamic Enum Introspection

plr-ivoryos inspects your hardware deck at runtime to generate dynamic Python Enums.

  • Plate Selection: Dropdowns are automatically populated with the specific plates on your deck.
  • Well Selection: Intelligent A1..H12 dropdowns for all aspiration and dispense commands.

Advanced Usage

Custom Backends

You can pass any standard PyLabRobot backend to the wrappers. This is how you connect to real hardware or specialized simulators.

from plr_ivoryos import Scale
from pylabrobot.scales.mettler_toledo_backend import MettlerToledoWXS205SDU

# Connect to a real Mettler Toledo balance
scale = Scale(backend=MettlerToledoWXS205SDU(port="COM3"))

Visual Simulator

To use PyLabRobot's browser-based simulator, simply use lh.start_visualizer():

from plr_ivoryos import LiquidHandler
from pylabrobot.liquid_handling.backends import ChatterBoxBackend

lh = LiquidHandler(backend=ChatterBoxBackend(), deck_json="my_layout.json"
)
lh.start_visualizer(open_browser=False)

Multichannel & Advanced Controls

The LiquidHandler seamlessly supports PyLabRobot's advanced liquid handling capabilities directly from the IvoryOS interface:

  • Slicing: You can enter well slices (e.g., "A1:A8", "A1:C1") to perform multichannel operations.
  • Dynamic List Parsing: For parameters like vols or flow_rates, you can enter a single number (which automatically broadcasts to all selected wells) or a comma-separated list of numbers (e.g., "100, 50, 200") for distinct volumes per channel.
  • Native Pro Controls: Form inputs for mix_volume, mix_repetitions, blow_out_air_volume, and more are provided out of the box, allowing granular pipetting control without writing any Python.
from plr_ivoryos import LiquidHandler
from pylabrobot.liquid_handling.backends import ChatterBoxBackend

lh = LiquidHandler(backend=ChatterBoxBackend())

Supported Devices

Device Type Class Name Simulation Shortcut Common Backends
Liquid Handler LiquidHandler simulated=True Hamilton STAR, OT-2, Tecan EVO
Balance Scale simulated=True Mettler Toledo
Pumps Pump simulated=True Cole-Parmer Masterflex
Heater/Shaker HeaterShaker simulated=True Inheco ThermoShake
Centrifuge Centrifuge simulated=True VSpin
Plate Reader PlateReader simulated=True CLARIOstar, Cytation5
Fans Fan simulated=True Hamilton HEPA
Thermocycler Thermocycler simulated=True Any PLR-supported TC

Installation

pip install plr-ivoryos

Or from source:

pip install .

Or using the requirements file:

pip install -r requirements.txt

How it Works

Async Bridge

PyLabRobot is built on asyncio. plr-ivoryos manages a dedicated background thread running a persistent event loop. All commands are safely bridged from the IvoryOS script-runner thread to the PLR loop, ensuring your UI stays responsive during long hardware operations.

Runtime Registry

Runtime-generated Enums are registered in plr_ivoryos._runtime_enums. IvoryOS introspects these at startup to build the interactive forms and dropdowns seen in the Control Panel.


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plr_ivoryos-0.1.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plr_ivoryos-0.1.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file plr_ivoryos-0.1.1.tar.gz.

File metadata

  • Download URL: plr_ivoryos-0.1.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plr_ivoryos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 686c202189292388bcc2f434a1e9d9b2cb7bcd19b30ad83ede1302ada0aff15a
MD5 ae6daec6b80c4cdbea91208aa9a2496d
BLAKE2b-256 d64e3a21303d96916281553f7b533d905384d63eb8760fffde66df753dcc6916

See more details on using hashes here.

File details

Details for the file plr_ivoryos-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: plr_ivoryos-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plr_ivoryos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01cfb2f0d6a5e5bfb64d8bad989c60e66bd56e14040a4be4e109fbcb23712cd2
MD5 16186df8573766d5fc8f9363c29cdc1c
BLAKE2b-256 e679c6312ab2b131188106d7c97d282a006ed2021cb65cfdfa9b0ac90154ecdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page