Liquid-handling robots are often limited by proprietary interfaces that are only compatible with a single type of robot and operating system, restricting method sharing and slowing development. Here, we present PyLabRobot, an open-source, cross-platform Python interface capable of programming diverse liquid-handling robots, including Hamilton STARs and Vantages, Tecan EVOs, and Opentron OT-2s. PyLabRobot provides an interface for a universal set of commands and deck layout representations while enabling the control of diverse accessory devices. The interface can work with any liquid-handling robot capable of aspirating and dispensing precise volumes of liquid within a Cartesian coordinate system. In addition to the already integrated robots, we include guidance on integrating new liquid-handling systems and accessories. We validated the framework through unit tests and application demonstrations, including a browser-based simulator, a position calibration tool, and a path-teaching tool for complex movements. PyLabRobot provides a flexible, open, and collaborative programming environment for laboratory automation.