Logo
Lab Automation,  Libraries and SDKs

PyHamilton

Date Published

Links

PyHamilton is a community-driven Python interface that lets laboratories write, test, and run liquid-handling protocols for Hamilton STAR and STARlet robots (with VANTAGE support available as a plugin). It wraps the Hamilton/VENUS control libraries so you can express pipetting, labware manipulation, and protocol logic in Python rather than in vendor-specific graphical tools. PyHamilton is not an official Hamilton product; it depends on the standard Hamilton software stack and runs on Windows using the vendor-provided libraries. Capabilities include direct control of deck motion and pipetting commands, the ability to run protocols in simulation mode, and integration with interactive Python sessions for iterative development. Typical usage starts with a small import such as from pyhamilton import HamiltonInterface, INITIALIZE and then creating a HamiltonInterface object to send commands. The package exposes low-level primitives for tip pickup, aspirate/dispense, and plate handling, and includes higher-level utilities for common tasks like plate transfers, serial dilutions, and scheduling of multi-channel operations. It also supports a simulated interface (HamiltonInterface(simulate=True)) so you can develop and test methods without a physical robot. Installation and environment requirements reflect PyHamilton's dependence on Hamilton's native software: you must install the standard Venus/Hamilton software for your robot and run on Windows (historically supported on Windows XP/7/10; modern Windows versions are used in practice). PyHamilton relies on a 32-bit Python build (some pythonnet modules have issues on 3.12+), the .NET Framework 4.0 or higher, and pythonnet interoperability. Typical setup steps include installing 32-bit Python, ensuring git is available, updating pip/setuptools, running the project's autoconfig tool which copies required files into the Hamilton Library folder (C:/Program Files (x86)/HAMILTON/Library), and then testing the connection with example scripts. If you're modifying or contributing to the library, cloning the repo and installing in editable/project mode lets changes take effect immediately for development and testing. PyHamilton provides a few noteworthy integrations and developer conveniences. It can be driven interactively from IPython, offers example projects that connect to AI assistants via OpenAI (the assist() helper can translate plain-language prompts into robot commands if you configure an OPENAI_API_KEY), and ships utilities for automated installation of needed helper files. The assist() feature requires installing IPython and the OpenAI client and should be used only in simulation until you are confident in the generated commands. The project also documents common troubleshooting items (for example, unblocking .dlls referenced by pythonnet, disabling VENUS run control, or removing unsupported device groupings like HxFan if your specific robot lacks that hardware). Typical use cases for PyHamilton include automated sample processing pipelines, high-throughput screens, feedback-controlled experiments (for example, closed-loop directed evolution or adaptive sampling), and integration of custom data analysis directly into robot-driven workflows. The library has been used in academic work describing flexible open-source automation and high-throughput platforms that combine robotics with experiment feedback. Because PyHamilton is open source, labs can extend it to support new hardware and custom labware, contribute new helper modules, or adapt the software to specific experimental requirements. Community and development are active parts of the project: there is a forum and an email contact for troubleshooting and discussion, and contributors are encouraged to help expand hardware support (ongoing efforts include a port to Nimbus instruments and reducing Windows dependence by rebuilding the VENUS pieces as Python libraries to enable cross-platform operation). Keep in mind the legal/disclaimer boundaries: PyHamilton is community supported rather than vendor-endorsed, so for official Hamilton support you should contact the Hamilton Company; for PyHamilton help, use the project's community channels.