Skip to main content

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

https://pypushflow.readthedocs.io/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypushflow-1.2.0.tar.gz (30.3 kB view details)

Uploaded Source

File details

Details for the file pypushflow-1.2.0.tar.gz.

File metadata

  • Download URL: pypushflow-1.2.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pypushflow-1.2.0.tar.gz
Algorithm Hash digest
SHA256 924924dc84e0939d387cab28a1f8ecf1791461929a11d09d748ae456266d110d
MD5 9839f8b63c41228e997d94caada5df95
BLAKE2b-256 fb8125d8dac58717241547626ca1edc625d1fbd959dd9b08cd5da7173cbb6e74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page