pyinfra Documentation

Welcome to the pyinfra v3 documentation. If you’re new to pyinfra you should start with the Getting Started page.

Using pyinfra

Getting Started
Start here! The quickest way to learn the basics of pyinfra and get started.
Using Operations
The guide to writing reusable, committable operations in Python files.
Inventory & Data
Use groups, host, and group data to control and configure operations for any environment.
Global Arguments
Arguments available in all operations & facts such as _sudo, _serial and _env.
Using the CLI
The pyinfra CLI is extremely powerful for ad hoc command execution and management.
Frequently Asked Questions
Quick answers to the most commonly asked questions for using pyinfra.

Deploy Reference

Example Deploys
A set of documented example deploys that focus on common patterns and use-cases.
Connectors Index
A list of connectors to target different hosts such as @docker, @local and @terraform.
Operations Index
A list of all available operations and their arguments, e.g. apt.packages.
Facts Index
A list of all facts pyinfra can gather from hosts, e.g. server.Hostname.

How pyinfra Works

How pyinfra Works
Discover how pyinfra orders, diffs and executes operations against target hosts.
Packaging Deploys
How to package, redistribute and share pyinfra deploys as Python packages.
Writing Connectors
How to write your own connectors for pyinfra.
Writing Facts & Operations
How to write your own facts & operations for pyinfra.
Using the API
How to use the pyinfra API.