Skip to main content
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

python -m pip install pypushflow[mx]

Use the mx option for installation at MX beamlines.

Run tests

python -m 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):
    """
    Workflow containing one start actor,
    one python actor and one stop actor.
    """

    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.test.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 1")
inData = {"name": "Jerry"}
outData = testMyWorkflow.run(inData, timeout=15, shared_pool=True)
assert outData["reply"] == "Hello Jerry!"

Download files

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

Source Distribution

pypushflow-0.3.0b3.tar.gz (17.2 kB view details)

Uploaded Source

File details

Details for the file pypushflow-0.3.0b3.tar.gz.

File metadata

  • Download URL: pypushflow-0.3.0b3.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pypushflow-0.3.0b3.tar.gz
Algorithm Hash digest
SHA256 e4b74cc0c40762dbf646bbaa5e9005a9d0abd90b8e7b5ba4b938b0fc6261552b
MD5 e892e0a2fbfa162c56747121213ad8b1
BLAKE2b-256 fbdaa9b0f61277cd3974e24bed42f5bdfd0a0092609b7f1a7447260e5ab04dd1

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 Sentry Error logging StatusPage Status page