monkey_wrench.task.base module
The module providing base models for tasks.
- class monkey_wrench.task.base.Context(*values)[source]
Bases:
str,EnumEnum for all possible task contexts.
- product_ids = 'ids'
- product_files = 'files'
- chimp = 'chimp'
- class monkey_wrench.task.base.Action(*values)[source]
Bases:
str,EnumEnum for all possible task actions.
- fetch = 'fetch'
- verify = 'verify'
- retrieve = 'retrieve'
- monkey_wrench.task.base._fold_collections(specifications: Model, folding_threshold: Annotated[int, Gt(gt=0)] = 10, number_of_items_to_show_at_each_end: Annotated[int, Gt(gt=0)] = 2) dict[source]
Fold the collections inside the given specifications if they have too many items.
This helps with better log messages.
- class monkey_wrench.task.base.TaskBase(*, verbose: bool = False, context: Context, action: Action, specifications: type[Model])[source]
Bases:
BaseModelPydantic base model for a task.
- verbose: bool
Whether the long collections must be folded or not.