A task scheduler for cyclic and acyclic graphs
Project description
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
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
pypushflow-2.0.0.tar.gz
(33.1 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.0.0.tar.gz.
File metadata
- Download URL: pypushflow-2.0.0.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f874eabf7b6cbc8fc21f3980282bef1a00d3ae37c8a97bb7624e99c376ad22f4
|
|
| MD5 |
3c69e3a79732afba2e17036459abb62f
|
|
| BLAKE2b-256 |
6f1965bb5febb5b283951a3b71e0994fbc0af633a5f0de9bb5a377d17625149e
|
File details
Details for the file pypushflow-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pypushflow-2.0.0-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b375e5296f6b6fd1e3319c6daad141dbabb1c06d3021b402ab28197c592b9a6
|
|
| MD5 |
17e2ee84fd1626a1e246e64747575bd5
|
|
| BLAKE2b-256 |
b5693b96632c43bc6eccca1fe738a1182682471d59b8ffcd293665b14d29f429
|