Pre-release
This release is a pre-release and may not be stable for production use.
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypushflow-2.1.0rc1.tar.gz
(40.4 kB
view details)
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 pypushflow-2.1.0rc1.tar.gz.
File metadata
- Download URL: pypushflow-2.1.0rc1.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e7307d70fdd22045129c05af73a515de7776ecaa237cd88fc8b2e74cbd1df49
|
|
| MD5 |
58f394020c27f87e2d2f294c1756782a
|
|
| BLAKE2b-256 |
3fb18ceda56405a600cb28d939c18c6879ec5e9e306a6064393ed3f2e06f2ec7
|
File details
Details for the file pypushflow-2.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: pypushflow-2.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40326d4c033319d1b8e001a97cd45d4852b8ad9a3cb9aa2b508bdd5255824f74
|
|
| MD5 |
f257a2559aee65e7137664e42208300a
|
|
| BLAKE2b-256 |
f1caad81d2f950d046fff79ef4d0131887e9f0514ef8bd063500206bcb21fedd
|