A new protocol for SDSS actors.
Project description
CLU implements a new protocol for SDSS actor while providing support for legacy-style actor.
Features
Installation
CLU can be installed using pip as
pip install sdss-clu
or from source
git clone https://github.com/sdss/clu
cd clu
pip install .
Development
clu uses uv for dependency management and packaging. To work with an editable install it’s recommended that you setup uv and install clu in a virtual environment by doing
uv sync --all-groups --all-extras
although it is also possible to install it using pip in editable mode
pip install -e .
We use ruff for linting and formatting. To check that your code conforms to the style guide run
ruff check python tests
ruff format --check python tests
Quick start
Creating a new actor with CLU is easy. To instantiate and run an actor you can simply do
import asyncio
from clu import AMQPActor
async def main(loop):
actor = await Actor('my_actor').start()
await actor.run_forever()
asyncio.run(main(loop))
Next, head to the Getting started section for more information about using actors. More examples are available here.
Why a new messaging protocol for SDSS?
Say whatever you want about it, the current SDSS message passing protocol based on Tron, opscore, and actorcore is stable and robust. So, why should we replace it? Here is a list of reasons:
It reinvents the wheel. Ok, in all honesty Tron and opscore were written when wheel were still not completely circular, but the truth is that nowadays there are more robust, standard, and better documented technologies out there for message passing.
We can remove the need for a central hub product by relying in open-source message brokers such as RabbitMQ.
Tron and opscore are Python 2 and it’s unclear the amount of effort that would be needed to convert them to Python 3.
While there is some documentation for Tron and opscore, and the code is well written, it’s also cumbersome and difficult to modify by people that didn’t write it. It’s ultimately non-maintainable.
The opsctore/actorkeys datamodel is custom-built and extremely difficult to maintain. Standard solutions such as JSON with a JSON schema validator should be preferred.
asyncio provides an asynchronous API that is cleaner and easier to code than using threads. It is also more readable and less convoluted than twisted and it’s a Python core library with very active development.
CLU uses click for parsing commands, providing a well-defined, easy to use parser.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sdss_clu-2.6.1.tar.gz.
File metadata
- Download URL: sdss_clu-2.6.1.tar.gz
- Upload date:
- Size: 124.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c99c285dfe802ca1509eacc250081d48c3f96111a4ad59bf419f6380b84b26c8
|
|
| MD5 |
b0eda4f349fd3ad974a6f6cb92f29534
|
|
| BLAKE2b-256 |
1968abd7a7b71a41700863db4e679adadc4605d8bde65248835f67da8e121a98
|
Provenance
The following attestation bundles were made for sdss_clu-2.6.1.tar.gz:
Publisher:
release.yml on sdss/clu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sdss_clu-2.6.1.tar.gz -
Subject digest:
c99c285dfe802ca1509eacc250081d48c3f96111a4ad59bf419f6380b84b26c8 - Sigstore transparency entry: 925519239
- Sigstore integration time:
-
Permalink:
sdss/clu@59550971a78b868c28fe091508de0380b5855f6e -
Branch / Tag:
refs/tags/2.6.1 - Owner: https://github.com/sdss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@59550971a78b868c28fe091508de0380b5855f6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file sdss_clu-2.6.1-py3-none-any.whl.
File metadata
- Download URL: sdss_clu-2.6.1-py3-none-any.whl
- Upload date:
- Size: 143.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
098594aa4fa9ef847bd176f55d2e072b3e503202034cf841597880ff475f8fca
|
|
| MD5 |
6dcbabe3c9d1d9bc0f032052bb1bd43f
|
|
| BLAKE2b-256 |
babe25dda3c989b9fe234b7b769388e74a00aac21fc51df1620c188f6baa65d4
|
Provenance
The following attestation bundles were made for sdss_clu-2.6.1-py3-none-any.whl:
Publisher:
release.yml on sdss/clu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sdss_clu-2.6.1-py3-none-any.whl -
Subject digest:
098594aa4fa9ef847bd176f55d2e072b3e503202034cf841597880ff475f8fca - Sigstore transparency entry: 925519244
- Sigstore integration time:
-
Permalink:
sdss/clu@59550971a78b868c28fe091508de0380b5855f6e -
Branch / Tag:
refs/tags/2.6.1 - Owner: https://github.com/sdss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@59550971a78b868c28fe091508de0380b5855f6e -
Trigger Event:
push
-
Statement type: