pyinfra.api.arguments module¶
-
class
pyinfra.api.arguments.
AllArguments
¶ Bases:
ConnectorArguments
,MetaArguments
,ExecutionArguments
-
name
: str¶
-
-
class
pyinfra.api.arguments.
ArgumentMeta
(description, default, handler=None)¶ Bases:
Generic
[T
]-
default
: Callable[['Config'], T]¶
-
description
: str¶
-
handler
: Callable[['Config', T], T] | None¶
-
-
class
pyinfra.api.arguments.
ConnectorArguments
¶ Bases:
TypedDict
-
class
pyinfra.api.arguments.
ExecutionArguments
¶ Bases:
TypedDict
-
pyinfra.api.arguments.
all_global_arguments
() List[tuple[str, Type]] ¶ Return all global arguments and their types.
-
pyinfra.api.arguments.
pop_global_arguments
(kwargs: dict[str, Any], state: 'State' | None = None, host: 'Host' | None = None, keys_to_check=None) tuple[AllArguments, list[str]] ¶ Pop and return operation global keyword arguments, in preferred order:
- From the current context (a direct @operator or @deploy function being called)
- From any current @deploy context (deploy kwargs)
- From the host data variables
- From the config variables