# -*- coding: utf-8 -*-
from setuptools import setup

modules = \
['fluidstate']
setup_kwargs = {
    'name': 'fluidstate',
    'version': '1.0.0b1',
    'description': 'Compact state machine in Python that can be vendored.',
    'long_description': 'Fluidstate\n==========\n\nCompact state machine that can be vendored.\n\n\nHow to use\n----------\n\nA very simple example taken from specs::\n\n    from fluidstate import StateMachine, state, transition\n\n    class SimpleMachine(StateMachine):\n\n         initial_state = \'created\'\n\n         state(\'created\')\n         state(\'waiting\')\n         state(\'processed\')\n         state(\'canceled\')\n\n         transition(before=\'created\', event=\'queue\', after=\'waiting\')\n         transition(before=\'waiting\', event=\'process\', after=\'processed\')\n         transition(before=[\'waiting\', \'created\'], event=\'cancel\', after=\'canceled\')\n\n\n"A slightly more complex example"\n---------------------------------\n\nFor demonstrating more advanced capabilities::\n\n        from fluidstate import StateMachine, state, transition\n\n        class Relationship(StateMachine):\n            initial_state = (\n                lambda relationship: relationship.strictly_for_fun() and \'intimate\' or \'dating\'\n            )\n\n            state(\'dating\', on_entry=\'make_happy\', on_exit=\'make_depressed\')\n            state(\'intimate\', on_entry=\'make_very_happy\', on_exit=\'never_speak_again\')\n            state(\'married\', on_entry=\'give_up_intimacy\', on_exit=\'buy_exotic_car\')\n\n            transition(before=\'dating\', event=\'get_intimate\', after=\'intimate\', need=\'drunk\')\n            transition(\n                before=[\'dating\', \'intimate\'],\n                event=\'get_married\',\n                after=\'married\',\n                need=\'willing_to_give_up_manhood\'\n            )\n\n            def strictly_for_fun(self) -> None:\n                pass\n\n            def drunk(self) -> bool:\n                return True\n\n            def willing_to_give_up_manhood(self) -> bool:\n                return True\n\n            def make_happy(self) -> None:\n                pass\n\n            def make_depressed(self) -> None:\n                pass\n\n            def make_very_happy(self) -> None:\n                pass\n\n            def never_speak_again(self) -> None:\n                pass\n\n            def give_up_intimacy(self) -> None:\n                pass\n\n            def buy_exotic_car(self) -> None:\n                pass\n\n\nStates\n------\n\nA Fluidstate state machine must have one initial state and at least one other additional state.\n\nA state may have pre and post callbacks, for running some code on state *on_entry*\nand *on_exit*, respectively. These params can be method names (as strings),\ncallables, or lists of method names or callables.\n\n\nTransitions\n-----------\n\nTransitions lead the machine from a state to another. Transitions must have\n*before*, *after*, and *event* parameters. *before* is one or more (as list) states\nfrom which the transition can be preed. *after* is the state to which the\ntransition will lead the machine. *event* is the method that have to be called\nto launch the transition. This method is automatically created by the Fluidstate\nengine.\n\nA transition can have optional *trigger* and *need* parameters. *trigger* is a\nmethod (or callable) that will be called when transition is launched. If\nparameters are passed to the event method, they are passed to the *trigger*\nmethod, if it accepts these parameters. *need* is a method (or callable) that\nis called to allow or deny the transition, depending on the result of its\nexecution. Both "trigger" and *need* can be lists.\n\nThe same event can be in multiple transitions, going to different states, having\ntheir respective needs as selectors. For the transitions having the same event,\nonly one need should return a true value at a time.\n\n\nIndividuation\n-------------\n\nStates and transitions are defined in a class-wide mode. However, one can define\nstates and transitions for individual objects. For example, having "door" as a\nstate machine::\n\n    door.add_state(\'broken\')\n    door.add_transition(event=\'crack\', before=\'closed\', after=\'broken\')\n\n\nThese additions only affect the after object.\n\n\nInstall\n-------\n\nRun::\n\n    pip install fluidstate\n\n\nTest\n----\n\nRn::\n\n    tox\n\n\nAttribution\n-----------\n\nFluidstate is forked from https://github.com/nsi-iff/fluidity created by Rodrigo Manhães.\n',
    'author': 'Jesse P. Johnson',
    'author_email': 'jpj6652@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/kuwv/python-fluidstate',
    'py_modules': modules,
    'python_requires': '>=3.6.2,<4.0.0',
}


setup(**setup_kwargs)
