diff --git a/bluesky_queueserver_api/_happi.py b/bluesky_queueserver_api/_happi.py new file mode 100644 index 0000000..6c65a98 --- /dev/null +++ b/bluesky_queueserver_api/_happi.py @@ -0,0 +1,24 @@ +"""Support for happi - +pcdshub.github.io/happi +""" + + +import copy + +from happi.item import HappiItem, EntryInfo # type: ignore + + +class REManagerAPIZMQItem(HappiItem): + zmq_control_addr = EntryInfo("ZMQ control address.", enforce=str, optional=False) + zmq_info_addr = EntryInfo("ZMQ info address.", enforce=str, optional=False) + kwargs = copy.copy(HappiItem.kwargs) + kwargs.default = {"zmq_control_addr": "{{zmq_control_addr}}", "zmq_info_addr": "{{zmq_info_addr}}"} + device_class = EntryInfo(default="bluesky_queueserver_api.zmq.REManagerAPI") + + +class REManagerAPIHTTPItem(HappiItem): + http_server_uri = EntryInfo("HTTP server URI.", enforce=str, optional=False) + http_auth_provider = EntryInfo("HTTP auth provider.", enforce=str, optional=False) + kwargs = copy.copy(HappiItem.kwargs) + kwargs.default = {"http_server_uri": "{{http_server_uri}}", "http_auth_provider": "{{http_auth_provider}}"} + device_class = EntryInfo(default="bluesky_queueserver_api.http.REManagerAPI") diff --git a/requirements.txt b/requirements.txt index 86f1c52..07d4c3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ # List required packages in this file, one per line. bluesky-queueserver -httpx \ No newline at end of file +httpx +happi