Metadata-Version: 1.0
Name: xworkflows
Version: 0.1
Summary: A library implementing workflows (or state machines) for Python projects.
Home-page: http://packages.python.org/xworkflows
Author: Raphaël Barrois
Author-email: raphael.barrois@polyconseil.fr
License: BSD
Description: XWorkflows
        ==========
        
        XWorkflows is a library to add workflows, or state machines, to Python objects.
        
        It allows to easilly define a workflow, attach it to a class, and use its transitions::
        
        class MyWorkflow(xworkflows.Workflow):
        # A list of state names
        states = ('foo', 'bar', 'baz')
        # A list of transition definitions; items are (name, source states, target).
        transitions = (
        ('foobar', 'foo', 'bar'),
        ('gobaz', ('foo', 'bar'), 'baz'),
        ('bazbar', 'baz', 'bar'),
        )
        initial_state = 'foo'
        
        
        class MyObject(xworkflows.WorkflowEnabled):
        state = MyWorkflow()
        
        # If a method has the name of a transition, it is used as its implementation.
        def foobar(self):
        return 42
        
        # It is also possible to use another method for a given transition.
        @transition('gobaz')
        def blah(self):
        return 13
        
        >>> o = MyObject()
        >>> o.state
        State('foo', 'foo')
        >>> o.state.is_foo
        True
        
        >>> o.foobar()
        42
        >>> o.state
        State('bar', 'bar')
        
        >>> o.blah()
        13
        >>> o.state
        State('baz', 'baz')
        
Keywords: workflow state machine automaton
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
