API Reference¶
The pyinfra API is designed to be used as follows:
- Create the state we are going to operate on, which consists of:
- An inventory
pyinfra.api.Inventory
containing hostspyinfra.api.Host
, plus any data - A config
pyinfra.api.Config
for global flag - A state
pyinfra.api.State
that combines the inventory & config
- An inventory
- Now that state is setup, we define operations:
pyinfra.api.operation.add_op
pyinfra.api.add_deploy
- Now that’s done, we execute it:
pyinfra.api.operations.run_ops
Currently the best example of this in action is in pyinfra’s own main.py.
- pyinfra.api.arguments module
- pyinfra.api.arguments_typed module
- pyinfra.api.command module
- pyinfra.api.config module
- pyinfra.api.connect module
- pyinfra.api.connectors module
- pyinfra.api.deploy module
- pyinfra.api.exceptions module
- pyinfra.api.facts module
- pyinfra.api.host module
- pyinfra.api.inventory module
- pyinfra.api.operation module
- pyinfra.api.operations module
- pyinfra.api.state module
- pyinfra.api.util module
- pyinfra.context module
- pyinfra.local module
- pyinfra.progress module
- pyinfra.version module