Skip to main content

Bluesky Hardware Proxy

This is a proxy server to provide access to certain bluesky device methods over a zmq interface. The interface is based directly on the zmq interface of bluesky-queueserver, so an identical client (with a different address) can be used. For convenience, a version of zmq_single_request with the default address of tcp://localhost:60620 is provided as bluesky_hwproxy.comms.zmq_single_request.

Starting a server

start-hwproxy-server is an entry point provided to start up an instance of hwproxy. It accepts the same parameters for specifying the environment that contains device objects as start-re-manager from bluesky-queueserver.

for example:

$ start-hwproxy-server --startup-script ./startup.py
$ start-hwproxy-server --startup-module ophyd.sim
$ start-hwproxy-server --startup-dir ./startup/

Note that at present, --startup-profile is not connected, though will be in the near future.

Connecting via python

from bluesky_hwproxy.comms import zmq_single_request

devices = zmq_single_request("list")[0]["result"]

describe = zmq_single_request("describe", {"device":devices[-1]})[0]["result"]

Connecting via cli

We provide a hwproxy command line program to allow interfacing with the hwproxy server

Commands to interact with the server itself:

$ hwproxy list # List available hardware as string keys, one per line
motor1
motor2
det

$ hwproxy reload # reload available devices

The following print JSON response to the terminal:

$ hwproxy read <device>
$ hwproxy describe <device>
$ hwproxy config read <device>
$ hwproxy config describe <device>
$ hwproxy hints <device>

Output is colorized when run from an interactive shell, plain text when e.g. piped.

Finally, we allow checking if a set position is valid:

$ hwproxy check <device> <value>
true

The result is simply true or false printed to the terminal.

<value> can be any json encoded string (most of the time it is a simple float, however pseudopositioners and specialized hardware may use lists, etfc.

Metadata

Release files for bluesky-hwproxy 2022.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bluesky-hwproxy 2022.8.0
File Size Uploaded Provenance Actions
bluesky-hwproxy-2022.8.0.tar.gz 6.3 kB Without provenance Details for bluesky-hwproxy-2022.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bluesky-hwproxy 2022.8.0
File Interpreter ABI Platform Actions
bluesky_hwproxy-2022.8.0-py3-none-any.whl Python 3 none any Details for bluesky_hwproxy-2022.8.0-py3-none-any.whl

Total release size: 13.9 kB

Release files / bluesky-hwproxy-2022.8.0.tar.gz

Download URL bluesky-hwproxy-2022.8.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2ae541df7d7a2386afcc3642a44a73bddb2ab3c04ede211f4fb7ea2aea0ffe19
BLAKE2b-256 checksum
How to use checksums
41694c48d432301e71bfe908420d59c7ef8ee77a26952c1e337c6e37f7305ee2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release files / bluesky_hwproxy-2022.8.0-py3-none-any.whl

Download URL bluesky_hwproxy-2022.8.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4728a4a5d895d91e8d61e4b249dd16fd5111dd9b6f2b9e8b7094c5095fa070c
BLAKE2b-256 checksum
How to use checksums
41eaf461bc6aaa150260e3076592bf63431dccd27871c083e4dfbad2b8540c0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Security for bluesky-hwproxy 2022.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page