pypushflow
A task scheduler for cyclic and acyclic graphs
Install
pip install pypushflow[mx]
Use the mx option for installation at MX beamlines.
Run tests
pip install pypushflow[test]
pytest
Getting started
import logging
from pypushflow.Workflow import Workflow
from pypushflow.StopActor import StopActor
from pypushflow.StartActor import StartActor
from pypushflow.PythonActor import PythonActor
from pypushflow.ThreadCounter import ThreadCounter
class MyWorkflow(Workflow):
def __init__(self, name):
super().__init__(name, level=logging.DEBUG)
ctr = ThreadCounter(parent=self)
self.startActor = StartActor(parent=self, thread_counter=ctr)
self.pythonActor = PythonActor(
parent=self,
script="pypushflow.tests.tasks.pythonActorTest.py",
name="Python Actor Test",
thread_counter=ctr,
)
self.stopActor = StopActor(parent=self, thread_counter=ctr)
self.startActor.connect(self.pythonActor)
self.pythonActor.connect(self.stopActor)
testMyWorkflow = MyWorkflow("Test workflow")
inData = {"name": "World"}
outData = testMyWorkflow.run(inData, timeout=15, pool_type="process")
assert outData["reply"] == "Hello World!"
Documentation
Metadata
Release files for pypushflow 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypushflow-2.0.0.tar.gz | 33.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypushflow-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.6 kB
Release files / pypushflow-2.0.0.tar.gz
| Download URL | pypushflow-2.0.0.tar.gz |
|---|---|
| Size | 33.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f874eabf7b6cbc8fc21f3980282bef1a00d3ae37c8a97bb7624e99c376ad22f4
|
|
BLAKE2b-256 checksum How to use checksums |
6f1965bb5febb5b283951a3b71e0994fbc0af633a5f0de9bb5a377d17625149e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / pypushflow-2.0.0-py3-none-any.whl
| Download URL | pypushflow-2.0.0-py3-none-any.whl |
|---|---|
| Size | 58.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b375e5296f6b6fd1e3319c6daad141dbabb1c06d3021b402ab28197c592b9a6
|
|
BLAKE2b-256 checksum How to use checksums |
b5693b96632c43bc6eccca1fe738a1182682471d59b8ffcd293665b14d29f429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|