Skip to main content

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

https://pypushflow.readthedocs.io/

Project details


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.0rc1.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypushflow-2.0.0rc1-py3-none-any.whl (58.5 kB view details)

Uploaded Python 3

File details

Details for the file pypushflow-2.0.0rc1.tar.gz.

File metadata

  • Download URL: pypushflow-2.0.0rc1.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

Hashes for pypushflow-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 08271a3b0d96a2f0348643d5083ddfac2ba71badc2093a32afe2a9ba32b8efdd
MD5 ca647a022e02f00d1a23c94ebe89c61d
BLAKE2b-256 4eb25bd75ab7685be8c9df20957d4e3679ad7efeef6c545480d719a0ca71dc97

See more details on using hashes here.

File details

Details for the file pypushflow-2.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: pypushflow-2.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 58.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pypushflow-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a1ab9f4a9cca61a17e57dfd45c265bbd8ad6b8c3803f759af59ab42e052b66c
MD5 f538f469d96e3cd5b53ba4a7cc192701
BLAKE2b-256 3c80101d6b65f12e8d4db6ec90df21289b143b0cf96ac171753ea8393f59d19b

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