Skip to content

Instantly share code, notes, and snippets.

@rbrady
Last active March 9, 2017 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbrady/d30ae640b19df658a17cd93827125678 to your computer and use it in GitHub Desktop.
Save rbrady/d30ae640b19df658a17cd93827125678 to your computer and use it in GitHub Desktop.
Mistral Custom Actions ~ Using Mixins
import abc
class Action(object):
@abc.abstractmethod
def run(self):
pass
class AsyncMixin(object):
def is_sync(self):
"""Returns False if the action is asynchronous, otherwise True."""
return False
class ContextMixin(object):
def set_context(self, context):
self.context = context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment