Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Expr Str Assign NameStore Str Expr Str Assign NameStore Str decorator_list AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore ListLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad For TupleStore NameStore NameStore NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad If BoolOpAnd NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str decorator_list AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body If CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return BinOpAdd Call NameLoad NameLoad Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Return SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A N/A abc N/A enum N/A six taskflow atom taskflow exceptions exc taskflow.utils misc Decision N/A N/A misc StrEnum N/A N/A Decision results/strategy enumeration. N/A REVERT REVERT N/A Reverts only the surrounding/associated subflow.

    This strategy first consults the parent atom before reverting the
    associated subflow to determine if the parent retry object provides a
    different reconciliation strategy.  This allows for safe nesting of
    flows with different retry strategies.

    If the parent flow has no retry strategy, the default behavior is
    to just revert the atoms in the associated subflow.  This is
    generally not the desired behavior, but is left as the default in
    order to keep backwards-compatibility.  The ``defer_reverts``
    engine option will let you change this behavior.  If that is set
    to True, a REVERT will always defer to the parent, meaning that
    if the parent has no retry strategy, it will be reverted as well.
     N/A REVERT_ALL REVERT_ALL N/A Reverts the entire flow, regardless of parent strategy.

    This strategy will revert every atom that has executed thus
    far, regardless of whether the parent flow has a separate
    retry strategy associated with it.
     N/A RETRY RETRY N/A N/A enum unique N/A REVERT N/A Decision REVERT N/A REVERT_ALL N/A Decision REVERT_ALL N/A RETRY N/A Decision RETRY N/A EXECUTE_REVERT_HISTORY history N/A REVERT_FLOW_FAILURES flow_failures History N/A object N/A N/A Helper that simplifies interactions with retry historical contents. __init__ N/A N/A self contents failure N/A None N/A N/A N/A self _contents contents N/A N/A self _failure failure N/A failure N/A N/A self N/A N/A N/A Returns the retries own failure or none if not existent. N/A N/A self _failure N/A property outcomes_iter N/A N/A self index N/A None N/A N/A Iterates over the contained failure outcomes.

        If the index is not provided, then all outcomes are iterated over.

        NOTE(harlowja): if the retry itself failed, this will **not** include
        those types of failures. Use the :py:attr:`.failure` attribute to
        access that instead (if it exists, aka, non-none).
         N/A N/A index None N/A N/A contents N/A self _contents N/A N/A contents N/A N/A N/A self _contents N/A index N/A N/A provided outcomes contents N/A N/A N/A owner outcome N/A N/A six iteritems outcomes N/A N/A N/A N/A owner outcome N/A __len__ N/A N/A self N/A N/A N/A N/A len N/A self _contents N/A provided_iter N/A N/A self N/A N/A N/A Iterates over all the values the retry has attempted (in order). N/A N/A provided outcomes N/A self _contents N/A N/A N/A provided N/A __getitem__ N/A N/A self index N/A N/A N/A N/A N/A self _contents N/A index N/A caused_by N/A N/A self exception_cls index include_retry N/A None False N/A N/A Checks if the exception class provided caused the failures.

        If the index is not provided, then all outcomes are iterated over.

        NOTE(harlowja): only if ``include_retry`` is provided as true (defaults
                        to false) will the potential retries own failure be
                        checked against as well.
         N/A N/A name failure N/A N/A self outcomes_iter index index N/A N/A N/A N/A failure check exception_cls N/A N/A True N/A N/A include_retry N/A N/A self _failure None N/A N/A N/A N/A N/A self _failure check exception_cls N/A N/A True N/A False N/A __iter__ N/A N/A self N/A N/A N/A Iterates over the raw contents of this history object. N/A N/A iter N/A self _contents N/A N/A Retry N/A N/A atom Atom N/A N/A A class that can decide how to resolve execution failures.

    This abstract base class is used to inherit from and provide different
    strategies that will be activated upon execution failures. Since a retry
    object is an atom it may also provide :meth:`~taskflow.retry.Retry.execute`
    and :meth:`~taskflow.retry.Retry.revert` methods to alter the inputs of
    connected atoms (depending on the desired strategy to be used this can be
    quite useful).

    NOTE(harlowja): the :meth:`~taskflow.retry.Retry.execute` and
    :meth:`~taskflow.retry.Retry.revert` and
    :meth:`~taskflow.retry.Retry.on_failure` will automatically be given
    a ``history`` parameter, which contains information about the past
    decisions and outcomes that have occurred (if available).
     __init__ N/A N/A self name provides requires auto_extract rebind N/A None None None True None N/A N/A N/A N/A N/A super Retry self __init__ name name provides provides requires requires rebind rebind auto_extract auto_extract ignore_list N/A EXECUTE_REVERT_HISTORY N/A name N/A N/A self N/A N/A N/A N/A self _name N/A property name N/A N/A self name N/A N/A N/A N/A self _name name N/A N/A name setter execute N/A N/A self history N/A args kwargs N/A N/A Executes the given retry.

        This execution activates a given retry which will typically produce
        data required to start or restart a connected component using
        previously provided values and a ``history`` of prior failures from
        previous runs. The historical data can be analyzed to alter the
        resolution strategy that this retry controller will use.

        For example, a retry can provide the same values multiple times (after
        each run), the latest value or some other variation. Old values will be
        saved to the history of the retry atom automatically, that is a list of
        tuples (result, failures) are persisted where failures is a dictionary
        of failures indexed by task names and the result is the execution
        result returned by this retry during that failure resolution
        attempt.

        :param args: positional arguments that retry requires to execute.
        :param kwargs: any keyword arguments that retry requires to execute.
         N/A N/A abc abstractmethod revert N/A N/A self history N/A args kwargs N/A N/A Reverts this retry.

        On revert call all results that had been provided by previous tries
        and all errors caused during reversion are provided. This method
        will be called *only* if a subflow must be reverted without the
        retry (that is to say that the controller has ran out of resolution
        options and has either given up resolution or has failed to handle
        a execution failure).

        :param args: positional arguments that the retry required to execute.
        :param kwargs: any keyword arguments that the retry required to
                       execute.
         N/A on_failure N/A N/A self history N/A args kwargs N/A N/A Makes a decision about the future.

        This method will typically use information about prior failures (if
        this historical failure information is not available or was not
        persisted the provided history will be empty).

        Returns a retry constant (one of):

        * ``RETRY``: when the controlling flow must be reverted and restarted
          again (for example with new parameters).
        * ``REVERT``: when this controlling flow must be completely reverted
          and the parent flow (if any) should make a decision about further
          flow execution.
        * ``REVERT_ALL``: when this controlling flow and the parent
          flow (if any) must be reverted and marked as a ``FAILURE``.
         N/A N/A abc abstractmethod N/A N/A N/A six add_metaclass N/A abc ABCMeta AlwaysRevert N/A Retry N/A N/A Retry that always reverts subflow. on_failure N/A N/A self N/A args kwargs N/A N/A REVERT N/A execute N/A N/A self N/A args kwargs N/A N/A N/A N/A AlwaysRevertAll N/A Retry N/A N/A Retry that always reverts a whole flow. on_failure N/A N/A self N/A kwargs N/A N/A REVERT_ALL N/A execute N/A N/A self N/A kwargs N/A N/A N/A N/A Times N/A Retry N/A N/A Retries subflow given number of times. Returns attempt number.

    :param attempts: number of attempts to retry the associated subflow
                     before giving up
    :type attempts: int
    :param revert_all: when provided this will cause the full flow to revert
                       when the number of attempts that have been tried
                       has been reached (when false, it will only locally
                       revert the associated subflow)
    :type revert_all: bool

    Further arguments are interpreted as defined in the
    :py:class:`~taskflow.atom.Atom` constructor.
     __init__ N/A N/A self attempts name provides requires auto_extract rebind revert_all N/A 1 None None None True None False N/A N/A N/A N/A N/A super Times self __init__ name provides requires auto_extract rebind N/A N/A self _attempts attempts N/A revert_all N/A N/A N/A self _revert_action REVERT_ALL N/A N/A N/A self _revert_action REVERT N/A on_failure N/A N/A self history N/A args kwargs N/A N/A N/A N/A len history N/A self _attempts N/A N/A RETRY N/A N/A self _revert_action N/A execute N/A N/A self history N/A args kwargs N/A N/A N/A N/A len history 1 N/A N/A ForEachBase N/A Retry N/A N/A Base class for retries that iterate over a given collection. __init__ N/A N/A self name provides requires auto_extract rebind revert_all N/A None None None True None False N/A N/A N/A N/A N/A super ForEachBase self __init__ name provides requires auto_extract rebind N/A revert_all N/A N/A N/A self _revert_action REVERT_ALL N/A N/A N/A self _revert_action REVERT N/A _get_next_value N/A N/A self values history N/A N/A N/A remaining N/A N/A misc sequence_minus values N/A N/A history provided_iter N/A N/A remaining N/A N/A N/A N/A exc NotFound N/A No elements left in collection of iterable retry controller %s N/A self name N/A N/A remaining N/A 0 N/A _on_failure N/A N/A self values history N/A N/A N/A N/A N/A N/A N/A self _get_next_value values history N/A N/A N/A N/A exc NotFound N/A N/A N/A self _revert_action N/A N/A RETRY N/A N/A ForEach N/A ForEachBase N/A N/A Applies a statically provided collection of strategies.

    Accepts a collection of decision strategies on construction and returns the
    next element of the collection on each try.

    :param values: values collection to iterate over and provide to
                   atoms other in the flow as a result of this functions
                   :py:meth:`~taskflow.atom.Atom.execute` method, which
                   other dependent atoms can consume (for example, to alter
                   their own behavior)
    :type values: list
    :param revert_all: when provided this will cause the full flow to revert
                       when the number of attempts that have been tried
                       has been reached (when false, it will only locally
                       revert the associated subflow)
    :type revert_all: bool

    Further arguments are interpreted as defined in the
    :py:class:`~taskflow.atom.Atom` constructor.
     __init__ N/A N/A self values name provides requires auto_extract rebind revert_all N/A None None None True None False N/A N/A N/A N/A N/A super ForEach self __init__ name provides requires auto_extract rebind revert_all N/A N/A self _values values N/A on_failure N/A N/A self history N/A args kwargs N/A N/A N/A N/A self _on_failure N/A self _values history N/A execute N/A N/A self history N/A args kwargs N/A N/A N/A N/A self _get_next_value N/A self _values history N/A N/A ParameterizedForEach N/A ForEachBase N/A N/A Applies a dynamically provided collection of strategies.

    Accepts a collection of decision strategies from a predecessor (or from
    storage) as a parameter and returns the next element of that collection on
    each try.

    :param revert_all: when provided this will cause the full flow to revert
                       when the number of attempts that have been tried
                       has been reached (when false, it will only locally
                       revert the associated subflow)
    :type revert_all: bool

    Further arguments are interpreted as defined in the
    :py:class:`~taskflow.atom.Atom` constructor.
     __init__ N/A N/A self name provides requires auto_extract rebind revert_all N/A None None None True None False N/A N/A N/A N/A N/A super ParameterizedForEach self __init__ name provides requires auto_extract rebind revert_all N/A on_failure N/A N/A self values history N/A args kwargs N/A N/A N/A N/A self _on_failure values history N/A execute N/A N/A self values history N/A args kwargs N/A N/A N/A N/A self _get_next_value values history N/A N/A