- class fabric.executor.Executor(collection: Collection, config: Optional[Config] = None, core: Optional[ParseResult] = None)¶
Executorsubclass which understands Fabric concepts.
This class is written to be backwards compatible with vanilla Invoke-level tasks, which it simply delegates to its superclass.
Please see the parent class’
documentationfor details on most public API members and object lifecycle.
Normalize mixed host-strings-or-kwarg-dicts into kwarg dicts only.
In other words, transforms data taken from the CLI (–hosts, always strings) or decorator arguments (may be strings or kwarg dicts) into kwargs suitable for creating Connection instances.
Subclasses may wish to override or extend this to perform, for example, database or custom config file lookups (vs this default behavior, which is to simply assume that strings are ‘host’ kwargs).
hosts – Potentially heterogenous list of host connection values, as per the
Homogenous list of Connection init kwarg dicts.
- parameterize(call, connection_init_kwargs)¶
Parameterize a Call with its Context set to a per-host Connection.