Skip to main content

Simple workflows for Python

Project description

https://travis-ci.org/inveniosoftware/workflow.png?branch=master https://coveralls.io/repos/inveniosoftware/workflow/badge.png?branch=master https://pypip.in/v/workflow/badge.png https://pypip.in/d/workflow/badge.png

About

Workflow is a Finite State Machine with memory. It is used to execute set of methods in a specified order.

Here is a simple example of a workflow configuration:

[
  check_token_is_wanted, # (run always)
  [                      # (run conditionally)
     check_token_numeric,
     translate_numeric,
     next_token          # (stop processing, continue with next token)
     ],
  [                      # (run conditionally)
     check_token_proper_name,
     translate_proper_name,
     next_token          # (stop processing, continue with next token)
     ],
  normalize_token,       # (only for "normal" tokens)
  translate_token,
]

Documentation

Documentation is readable at http://workflow.readthedocs.org or can be built using Sphinx:

pip install Sphinx
python setup.py build_sphinx

Installation

Workflow is on PyPI so all you need is:

pip install workflow

Testing

Running the test suite is as simple as:

python setup.py test

or, to also show code coverage:

./run-tests.sh

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

workflow-1.2.0.tar.gz (44.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: workflow-1.2.0.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for workflow-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d2be5d461ff73e68a838916650acd505ef89dbb102121acf6a618165c62cc667
MD5 fe071e808808a47eefa37954db60489a
BLAKE2b-256 52509b23ccc26d550abb1fdc7147e37b9f02cdff9ab7c66b791052e3604c6603

See more details on using hashes here.

Supported by

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