fito.operations package¶
Submodules¶
fito.operations.decorate module¶
-
fito.operations.decorate.
GenericDecorator
[source]¶ Abstracts all the boilerplate required to build a decorator that works on functions, instance methods and class methods
Parameters: method_type – if is None, the decorated function is assumed to be a function, otherwise it is assumed to be a method. If method_type == ‘instance’ the function is assumed to be an instance method otherwise a classmethod
-
fito.operations.decorate.
as_operation
[source]¶ Creates an operation from a callable :param out_type: Base class of the operation to be built. Defaults to Operation :param out_name: Name of the class to be built, deafults to the decorated function name.
-
fito.operations.decorate.
get_default_values
(f_spec)[source]¶ Returns a mapping from a function spec (output of inspect.getargspec)
-
fito.operations.decorate.
operation_from_func
(to_wrap, func_to_execute, out_type, out_name, args_specifications, f_spec=None, method_type=None, first_arg=None, cache_on=None)[source]¶ In the case of methods, to_wrap is not the same to func_to_execute :param to_wrap: See GenericDecorator.create_decorated for an explanation :param func_to_execute: See GenericDecorator.create_decorated for an explanation :param cache_on: A data store onto which the operation should be cached :return:
fito.operations.dependencies module¶
-
class
fito.operations.dependencies.
DependencyGraph
[source]¶ Bases:
object
Main class to both manipulate the graph and inherit to get cool graph powers
-
dependency_graph
= {}¶
-
fito.operations.operation module¶
-
class
fito.operations.operation.
MemoryObject
(*args, **kwargs)[source]¶ Bases:
fito.operations.operation.Operation
- MemoryObject fields:
- obj = PrimitiveField(0) out_data_store = BaseSpecField(default=None, serialize=False)
-
obj
= PrimitiveField(0)¶
-
class
fito.operations.operation.
Operation
(*args, **kwargs)[source]¶ Bases:
fito.specs.base.Spec
- Operation fields:
- out_data_store = BaseSpecField(default=None, serialize=False)
-
default_data_store
= None¶
-
out_data_store
= BaseSpecField(default=None, serialize=False)¶