{"id":23370,"library":"bluesky","title":"Bluesky","description":"Bluesky is a Python library for experiment specification and orchestration, providing a run engine (RunEngine) that coordinates data acquisition plans, detectors, and flyers. It is part of the broader Bluesky ecosystem for synchrotron and laboratory data acquisition. Current version 1.15.0 (requires Python >=3.10). Releases roughly quarterly, with a focus on stability and performance improvements.","status":"active","version":"1.15.0","language":"python","source_language":"en","source_url":"https://github.com/bluesky/bluesky","tags":["synchrotron","beamline","data acquisition","experiment orchestration","bluesky"],"install":[{"cmd":"pip install bluesky","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge bluesky","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Provides document schema for event streams.","package":"event-model","optional":false},{"reason":"Optional live plotting callbacks.","package":"matplotlib","optional":true},{"reason":"Hardware abstraction layer (devices).","package":"ophyd","optional":true},{"reason":"Data access library for Tiled servers (used in TiledWriter).","package":"tiled","optional":true}],"imports":[{"note":"RunEngine is at the top-level, not in a submodule.","wrong":"from bluesky.run_engine import RunEngine","symbol":"RunEngine","correct":"from bluesky import RunEngine"},{"note":"The standard convention is to import the 'plans' module as 'bp'.","wrong":"from bluesky.plan import bp","symbol":"Plan","correct":"from bluesky import plan as bp"},{"note":"Message objects are accessed via `bluesky.msg.Msg`, not a separate message module.","wrong":"from bluesky.message import Msg","symbol":"Msgen","correct":"from bluesky import msg"}],"quickstart":{"code":"from bluesky import RunEngine\nfrom bluesky.plans import count\nfrom bluesky.callbacks import LiveTable\n\nRE = RunEngine()\ndef detector():\n    return {'det': 1}\nRE(count([detector()])","lang":"python","description":"Instantiates a RunEngine, defines a dummy detector (callable returning a dict), and executes a count plan with a live table callback."},"warnings":[{"fix":"Update any custom device `set` methods to accept `**kwargs` and pass values as keyword arguments.","message":"In v1.14.0, `Movable.set` arguments changed: previously positional, now only keyword arguments are accepted.","severity":"breaking","affected_versions":">=1.14.0"},{"fix":"Replace `count([det])` with `count([det])` (outer plan) – they are directly callable.","message":"`bluesky.plans.inner_product` and other 'inner' plans are deprecated; use the 'outer' plan wrappers.","severity":"deprecated","affected_versions":">=1.10.0"},{"fix":"Use a single global RE instance; avoid re-instantiation.","message":"The RunEngine is a singleton per process. Creating multiple RE instances can lead to unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Call `RE.subscribe(callback)` before `RE(plan)`.","message":"Subscriptions via `RE.subscribe` must be set before the plan is executed; late subscriptions may miss events.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Call `RE(my_plan)` instead of `RE(plan=my_plan)`.","cause":"Passing a plan to RE() incorrectly; RE expects a plan as the first argument, but user tried `RE(plan=my_plan)`.","error":"TypeError: __init__() got an unexpected keyword argument 'plan'"},{"fix":"Ensure bluesky>=0.10 and use `from bluesky import RunEngine`.","cause":"Incorrect import or older bluesky version (<0.10) where RunEngine was in a different location.","error":"AttributeError: module 'bluesky' has no attribute 'RunEngine'"},{"fix":"Ensure setpoints are scalars (float/int) and not arrays; use `float(value)` if necessary.","cause":"Passing a numpy array where a scalar is expected, e.g., as a motor setpoint in a plan.","error":"ValueError: The truth value of an array with more than one element is ambiguous"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}