Decorator Descriptors

botoflow.decorator_descriptors

Descriptors allow us to manipulate Python functions/methods at a much deeper level.

This is extremely useful for our workflow and activity decorators as descriptors allow us to perform different actions depending on whether the call was made from the class or instance. Thereby allowing things like calling activities from the workflow execution as if they were classmethod*s*.

To learn more about descriptors and using them, please check the official Python documentation: Implementing Descriptors.

class botoflow.decorator_descriptors.ActivityFunc(func)

This class follows the descriptor protocol and allows us to properly detect if the activity is being called on an instance, or a class.

class botoflow.decorator_descriptors.SignalFunc(func)

This class follows the descriptor protocol and allows us to catch workflow instance the signal is being executed in.

class botoflow.decorator_descriptors.WorkflowExecuteFunc(func)

This class follows the descriptor protocol and allows us to properly detect if the workflow execute is being called on an instance, or a class.