pyinfra is a Python-native, agentless infrastructure automation and configuration management tool that runs commands over SSH concurrently and idempotently. It targets SSH servers, Docker containers, and local machines, using plain Python deploy scripts instead of YAML or a custom DSL. Operations are idempotent and can be previewed with a dry-run diff before being applied.
What it's for
Automate infrastructure changes across thousands of servers over SSHInstall packages, template config files, and manage services (e.g. apt.packages, files.template, systemd.service)Preview changes before applying them using a dry-run diff (--dry)Target specific host groups from a Python inventory file (--limit)Manage Docker, LXC, and Kubernetes hosts via connectorsReplace existing Ansible playbooks with plain Python deploy scripts
Features 13
- --limit flag to target specific host groups
- Agentless — only requires a shell and SSH on target hosts
- Built-in operations such as apt.packages, files.template, systemd.service
- Claims 6x faster execution than Ansible on identical workloads
- Concurrent fact-gathering before running deploys
- Concurrent SSH execution built on gevent
- Custom operations can be written in about 10 lines of code
- Dry-run mode to preview changes before applying (--dry)
- Idempotent operations (re-runs are no-ops)
- Python-based inventory files supporting groups and host metadata
- Python-native deploy scripts, no YAML or custom DSL
- Realtime streaming output of operation results
- Scales from a single host to 10,000+ hosts
At a glance
free tieropen source
TypeCLI tool
DeploymentInstalled (local)
PlatformsWindows, macOS, Linux
Companypyinfra
Integrations
LXCKubernetesDocker
Resources
Pricing
pyinfra is free and open-source (MIT licensed); no paid plans or pricing tiers are mentioned.
Similar apps
SaltOpen sourceAutomation, infrastructure management, data-driven orchestration and remote execution, configuration managementPriceNot statedTry freeFree planRuns on—Features19
FabricOpen sourcePythonic remote executionPriceFreeTry freeFree planRuns on—Features17
CapistranoOpen sourceA remote server automation and deployment tool written in Ruby.PriceNot statedTry freeFree planRuns on—Features20
pypyrOpen sourcetask-runner for automation pipelines defined in yamlPriceFreeTry freeFree planRuns onWindows · macOS +1Features17
Commando.ioManage servers easily online.Price$12–$199/moTry free—Runs onWeb · iOSFeatures18
KamalOpen sourceDeploy web apps anywherePriceNot statedTry freeFree planRuns on—Features16