This release is a pre-release and may not be stable for production use.
redsun
A component-based, customizable application framework for scientific hardware orchestration, based on the Bluesky framework.
Problem statement
In scientific research involving device control, one of the major problems is orchestrating different hardware units to achieve reusable, reliable and documentable workflows. On top of that, such hardware orchestration should provide a coherent and understandable user interface that less technical inclined users are able to understand and leverage accurately.
This proves challenging, because making experiments is a fluid endevour. It's hard (next to impossible) to predict what are the actual final requirements a software should encapsulate, especially if the final output is to face this to scientists with no engineering background.
Rather than trying to ship an entire software on its own, redsun follows the idea of component-based development: ship off-the-shelf components, assemble and wire them depending on the needs.
Component-based development (CBD)
In CBD, interfaces are key. Each component express what it requires to be built, as well as offering functionalities that can be leveraged by other components.
Components are wrapped into an AppContainer that takes care of bootstrapping the actual application for you, letting you focus on what each component should deliver.
from mylab.devices import MyMotor
from mylab.presenters import MyController
from mylab.views import MyView
from redsun.containers import declare_device, declare_presenter, declare_view
from redsun.qt import QtAppContainer
class MyApp(QtAppContainer):
stage = declare_device(MyMotor, axis=["X", "Y"], egu="mm")
ctrl = declare_presenter(MyController, timeout=2.0)
panel = declare_view(MyView)
def wire(self) -> None:
self.connect(self.ctrl.sig_position_changed, self.panel.update_position)
MyApp(session="my-session").run()
Each component is declared once, with the arguments it needs. wire says which signal reaches which method; the container builds everything in dependency order and connects it.
redsun provides the common glue code that each component can use to ship entire applications or single, reusable components. Leveraging Python entry points, an application can also be shipped as a single YAML configuration file, provided that different contributing components expose a redsun.yaml manifest.
So the same application can be expressed as:
# session.yaml
schema_version: 1.0
frontend: pyqt
session: my-session
devices:
stage:
plugin_name: mylab
plugin_id: my_motor
axis: ["X", "Y"]
egu: mm
presenters:
ctrl:
plugin_name: mylab
plugin_id: my_controller
timeout: 2.0
views:
panel:
plugin_name: mylab
plugin_id: my_view
wiring:
- from: ctrl.sig_position_changed
to: panel.update_position
plugin_id is resolved through the manifest the contributing package ships:
# mylab/redsun.yaml
devices:
my_motor: mylab.devices:MyMotor
presenters:
my_controller: mylab.presenters:MyController
views:
my_view: mylab.views:MyView
Launch it with:
from redsun.container import AppContainer
AppContainer.from_config("session.yaml").run()
AppContainer architecture
Each redsun container is structured as a Device-View-Presenter (DVP) application. This resembles the Model-View-Presenter (MVP) architecture, with the difference that at the lower level of the application sits the Device layer, leveraging ophyd-async, to interact with hardware components.
This is to make a clear statement: redsun is primarely about device control, and tries to do it well.
Documentation
See the documentation for more informations.
License
redsun is released under license Apache 2.0.
See the license for further details.
Release files for redsun 0.13.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| redsun-0.13.0rc1.tar.gz | 91.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redsun-0.13.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 204.2 kB
Release files / redsun-0.13.0rc1.tar.gz
| Download URL | redsun-0.13.0rc1.tar.gz |
|---|---|
| Size | 91.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9b5ca6ada8d160a616ac8ca0f675c34b94e3395f1c05ddb6f9332faa3bec20c
|
|
BLAKE2b-256 checksum How to use checksums |
c162765c4dfa6e64b33ffe0787cb664e6fadcfaa8ddba2e8b1aef4a6b6ef18f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / redsun-0.13.0rc1-py3-none-any.whl
| Download URL | redsun-0.13.0rc1-py3-none-any.whl |
|---|---|
| Size | 112.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2a49a66dae5e738732d0a939330b8b51c28ca7bc547b0f3997e77ae3c893212
|
|
BLAKE2b-256 checksum How to use checksums |
e3545c8ce60602003d2144e1ec8b9c4ff5b8999155a664ff0b2aa221be15eec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log