
pyinfra
pyinfra is a free, Python-native, agentless tool for automating infrastructure across servers.
What pyinfra is
pyinfra is a free, Python-native, agentless tool for automating infrastructure across servers. It connects over SSH to run commands concurrently and idempotently, using Python deploys and inventories. Operations can define a desired host state or run specific commands, and the `--dry` option previews changes per host before applying them. The project describes use from one host to 10,000, with parallel execution and real-time streaming output. Target hosts need a shell and SSH, but no agent, daemon, state files, or control plane. Documented connectors include SSH, Docker, Terraform, and the local machine. Operations cover package managers, files, services, databases, security, and containers. pyinfra runs wherever Python runs, with Mac, Linux, and Windows named as supported control systems. Python 3.10 or later is required; pyinfra 3.5.1 and later supports Python 3.10 through 3.13. The tool is MIT licensed. For assistance, the project points users to Matrix and Stack Overflow, and bug reports to GitHub issues. Windows installation requires Administrator privileges, while the installation guide recommends keeping pyinfra and dependencies current and installing as a regular user rather than root or sudo.
Good
- Runs commands concurrently and idempotently over SSH.
- Previews per-host changes with `--dry`.
- Target hosts need no agent or daemon.
- Connectors include Docker, Terraform, and local machine.
Watch out
- Requires Python 3.10 or later.
- Windows installation requires Administrator privileges.
- Target hosts need a shell and SSH.
Who it suits
pyinfra suits infrastructure operators comfortable using Python deploys and inventories to automate server tasks. It can be controlled from Mac, Linux, or Windows, while target hosts need SSH and a shell.
Verdict
pyinfra provides agentless automation with both declarative operations and direct commands. Its Python requirement and SSH-based target requirements are central considerations for deployment.
Plans and prices
From pyinfra's own pricing page, checked 5 Oct 2001.
| Plan | Price | What it gives you |
|---|---|---|
| pyinfra | Free | MIT licensed · Python 3.10+ |
The facts
Each one read from pyinfra's own pages, with the date it was checked.
What it does
- Agents
- The site says target hosts need a shell and SSH, with no agents, daemons, state files, or control plane.checked 5 Oct 2001
- Connectors
- Documented popular connectors include SSH, Docker, Terraform, and the local machine.checked 5 Oct 2001
- Declarative and imperative operations
- Operations can describe a desired host state or run specific commands directly.checked 5 Oct 2001
- Intended use
- The site presents pyinfra for automating infrastructure across servers using Python deploys and inventories.checked 5 Oct 2001
- Operations
- The operations reference lists modules for package managers, files, services, databases, security, and containers.checked 5 Oct 2001
- Preview changes
- The site says `--dry` previews per-host changes before they are applied.checked 5 Oct 2001
- Purpose
- pyinfra is a Python-native, agentless automation tool that runs commands over SSH concurrently and idempotently.checked 5 Oct 2001
- Python requirement
- Python 3.10 or later is required, and pyinfra 3.5.1+ supports Python 3.10 through 3.13.checked 5 Oct 2001
- Remote system compatibility
- The compatibility page says pyinfra aims to support Unix-like systems and lists Linux distributions, BSDs, OpenSUSE, macOS via `@local`, and Docker via `@docker`.checked 5 Oct 2001
- Scale
- The site says pyinfra works on one host or 10,000, with parallel execution and real-time streaming output.checked 5 Oct 2001
- Security practices
- The installation guide recommends keeping pyinfra and dependencies up to date and installing as a regular user rather than root or sudo.checked 5 Oct 2001
- Support
- The project directs users to its Matrix room and Stack Overflow for help, and to GitHub issues for bug reports.checked 5 Oct 2001
Where it runs
- Control platforms
- pyinfra runs wherever Python runs; the compatibility page names Mac, Linux, and Windows as supported control systems.checked 5 Oct 2001
- Windows requirement
- The installation page says Windows users need Administrator privileges for installation.checked 5 Oct 2001
Alternatives to pyinfra
- 1

Puppet
Free planOpen sourceWebAPILinuxmacOS8.3From $120 a month - 2

Rudder
Free planOpen sourceWebAPILinuxSelf-hosted8.2From $3.33 a month - 3

CFEngine
Free planOpen sourceWebAPILinuxmacOS7.7Free plan - 4

Uyuni
Free planOpen sourceWebAPILinuxSelf-hosted7.4Free plan - 5

Google Cloud VM Manager
Free planWebAPILinuxWindows7.1Free plan - 6

Salt
Free planAPILinuxmacOSSelf-hosted7.0Free plan
