Skip to main content

ophyd-service

Prototype for REST API Server for Ophyd devices

Starting the server:

uvicorn --host localhost --port 60620 ophyd_service.server:app

Starting the server with config file:

OPHYD_SERVICE_CONFIG=config.yml uvicorn --host localhost --port 60620 ophyd_service.server:app

Minimum config file:

authentication:
    single_user_api_key: a

Starting with single user API key:

OPHYD_SERVICE_SINGLE_USER_API_KEY=a uvicorn --host localhost --port 60620 ophyd_service.server:app

The API can be accessed as following:

http GET http://localhost:60620/api/ping 'Authorization: ApiKey a'

The API that reads a device:

http GET http://localhost:60620/api/device/read/sim_periodic_device/sine 'Authorization: ApiKey a'

Running helper script for monitoring status:

python status_monitor.py --api-key a

Running helper script for monitoring devices (devices are available in the demo profile):

python stream_monitor.py --api-key a --devices sim_periodic_device.noise sim_periodic_device.sine
python stream_monitor.py --api-key a --devices rand_async_device2.value
python stream_monitor.py --api-key a --devices rand_async_device1.value rand_async_device2.value

Metadata

Release files for ophyd-service 0.0.1

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

Source distribution (sdist)

Source distribution for ophyd-service 0.0.1
File Size Uploaded
ophyd_service-0.0.1.tar.gz 91.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ophyd-service 0.0.1
File Interpreter ABI Platform
ophyd_service-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 178.9 kB

Release files / ophyd_service-0.0.1.tar.gz

Download URL ophyd_service-0.0.1.tar.gz
Size 91.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d69188dfebeee86d9617ff76f34b3916866da119255dccaab13d67d83e9ceb8f
BLAKE2b-256 checksum
How to use checksums
921aa18c71422f030959f1e80e53acc298d0e46dadbe9e01046dd09eee71934b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ophyd_service-0.0.1-py3-none-any.whl

Download URL ophyd_service-0.0.1-py3-none-any.whl
Size 87.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e39e54f5dd913f236e3ff27bdb9d83be0d161fe88575ffa7f0aad86df8849578
BLAKE2b-256 checksum
How to use checksums
a44afcfc39e39e4228513fe8731c052b86e2e60ef377a5ec65c0018906842f12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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