Infrastructure automation with Python
pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine, and Docker containers.
Quick Start
Get up and running with pyinfra in minutes
Run your first command
@docker/ubuntu), the local machine (@local), and other connectors.Use operations
iftop package is installed, running updates if needed.Explore by Topic
Dive deeper into pyinfra’s capabilities
Core Concepts
Operations Reference
CLI Reference
API Reference
Key Features
Why developers choose pyinfra for infrastructure automation
Super Fast Execution
Execute over thousands of hosts with predictable performance and parallel execution.
Idempotent Operations
Safe deployments with dry runs and diffs before making any changes to your infrastructure.
Python-Based
Write infrastructure as Python code, not YAML. Use the entire Python ecosystem.
Multiple Connectors
Connect to SSH servers, Docker containers, local machine, and integrate with Terraform and Vagrant.
Ready to automate your infrastructure?
Get started with pyinfra and deploy with confidence using Python.
Start Building