skillfed

ophyd

Bluesky hardware abstraction with an emphasis on EPICS

ophyd v1.11.2 97.1K downloads/30d#13,167 on PyPI72
Permissive license BSD Active released

What it is and what it does

Ophyd is a hardware abstraction library designed for scientific experiment orchestration and data acquisition. It sits between experiment control code and physical devices or control systems, allowing you to write device-agnostic logic that works across different hardware setups. The library is built around the concept of grouping individual control channels (such as EPICS PVs) into logical Device objects with high-level methods like trigger(), read(), and set(...), and it assigns meaningful names and metadata categories to readings so they propagate correctly into analysis pipelines.

Ophyd is typically used with the Bluesky Run Engine for coordinated experiment execution, though it can also be used standalone. It supports EPICS as a primary control system but is designed to work with other systems as well. The library depends on networkx, numpy, opentelemetry-api, packaging, and pint for graph operations, numerical work, observability, version handling, and unit management respectively.

Use it for:

  • Integrate EPICS-based beamline hardware into a Python experiment orchestration workflow without writing device-specific control code.
  • Group related motor, detector, and sample-stage channels into a single Device object that can be configured and used as a coordinated unit.
  • Assign meaningful names and metadata categories to sensor readings so they flow correctly into data analysis pipelines and experiment logs.
  • Build portable experiment scripts that work across different beamlines or facilities by abstracting away hardware-specific details.
  • Coordinate multi-step experiments where devices must be triggered, read, and configured in a specific sequence.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Ophyd provides a Python abstraction layer for hardware control and data acquisition, enabling experiment orchestration code to work with devices and control systems like EPICS without device-specific details.

Yes. Ophyd is actively maintained, production-stable, has no known vulnerabilities, and installs with low friction. It is the standard abstraction layer for hardware control in the Bluesky ecosystem and is well-suited for scientific facilities and research labs that need to orchestrate experiments across diverse hardware. Install it if you are building experiment control code or integrating with EPICS or similar control systems.

Install

ophyd on PyPI

pip

pip install ophyd

uv

uv add ophyd

poetry

poetry add ophyd

Installing ophyd

Before you install

Low install friction with a pure-wheel distribution. The package is actively maintained with a recent release and supports current Python versions (3.8–3.13). Five runtime dependencies are all standard scientific/utility libraries.

License in practice

BSD license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute ophyd freely provided you retain the license notice.

Quickstart

pip install ophyd

from ophyd import Device, Component
from ophyd.epics_motor import EpicsMotor

class MyMotor(Device):
    motor = Component(EpicsMotor, 'PV:motor')

device = MyMotor(name='my_motor')

Requires an EPICS control system or compatible hardware backend to be useful; standalone use is possible but limited.

Verify before relying

  • Specific EPICS version compatibility and whether non-EPICS control systems are equally well-supported.
  • Performance characteristics when handling large numbers of devices or high-frequency data streams.
  • Integration maturity with control systems other than EPICS.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — networkx, numpy, opentelemetry-api, packaging, pint
Maintenance actively maintained — 71 days since the last release
Last repo commit
First released
Downloads 97,103/month — #13,167 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ophyd-1.11.2-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

hardware abstraction layer pythonEPICS device controlexperiment data acquisitionbluesky hardware interfacedevice orchestration frameworkcontrol system integrationscientific instrument control
hardware-abstractionepics-integrationexperiment-orchestration

More Scientific/Engineering packages