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.Inventorycontaining hostspyinfra.api.Host, plus any dataA config
pyinfra.api.Configfor global flagA state
pyinfra.api.Statethat combines the inventory & config
- Now that state is setup, we define operations:
 pyinfra.api.operation.add_oppyinfra.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.
Core API
- 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.metadata 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
 
            pyinfra next