vmklib.tasks.mixins package#
Submodules#
vmklib.tasks.mixins.concrete module#
A task mixin for writing concrete outputs to a build directory.
- class vmklib.tasks.mixins.concrete.ConcreteBuilderMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
VmklibBase
Create a concrete file output after a task completes.
- concrete_path(inbox: Dict[str, Dict[str, Any]], substitutions: Dict[str, str | int] = None) Path [source]#
By default name the concrete after the compiled target name.
- is_concrete_stale(inbox: Dict[str, Dict[str, Any]], candidates: Iterable[Path | str | None], substitutions: Dict[str, str | int] = None) bool [source]#
Check if any candidate paths are modified after the concrete was.
- class vmklib.tasks.mixins.concrete.ConcreteOnceMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
ConcreteBuilderMixin
A mixin for tasks that only need to run once.
vmklib.tasks.mixins.curl module#
A module for working with curl commands.
- class vmklib.tasks.mixins.curl.CommandResult(code: int, stdout: str, stderr: str)[source]#
Bases:
NamedTuple
A container for a system command result.
- code: int#
Alias for field number 0
- stderr: str#
Alias for field number 2
- stdout: str#
Alias for field number 1
- class vmklib.tasks.mixins.curl.CurlMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
SubprocessLogMixin
A task for generating ninja configurations.
- async curl(*args: str, post_data: Dict[str, Any] = None, headers: Dict[str, str] = None, method: str = None) CommandResult [source]#
Run a curl command.
Module contents#
A module for aggregating mixin classes.
- class vmklib.tasks.mixins.CommandResult(code: int, stdout: str, stderr: str)[source]#
Bases:
NamedTuple
A container for a system command result.
- code: int#
Alias for field number 0
- stderr: str#
Alias for field number 2
- stdout: str#
Alias for field number 1
- class vmklib.tasks.mixins.ConcreteBuilderMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
VmklibBase
Create a concrete file output after a task completes.
- concrete_path(inbox: Dict[str, Dict[str, Any]], substitutions: Dict[str, str | int] = None) Path [source]#
By default name the concrete after the compiled target name.
- is_concrete_stale(inbox: Dict[str, Dict[str, Any]], candidates: Iterable[Path | str | None], substitutions: Dict[str, str | int] = None) bool [source]#
Check if any candidate paths are modified after the concrete was.
- class vmklib.tasks.mixins.ConcreteOnceMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
ConcreteBuilderMixin
A mixin for tasks that only need to run once.
- class vmklib.tasks.mixins.CurlMixin(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
SubprocessLogMixin
A task for generating ninja configurations.
- async curl(*args: str, post_data: Dict[str, Any] = None, headers: Dict[str, str] = None, method: str = None) CommandResult [source]#
Run a curl command.