# pyinfra-dev/pyinfra

🔧 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. Fast and scales from one server to thousands.

Repository: https://github.com/pyinfra-dev/pyinfra
Canonical: https://ross.abutalabs.com/products/pyinfra
Homepage: https://pyinfra.com
Language: Python
License: MIT
License Family: permissive
Topics: python, cloud-management, configuration-management, remote-execution, high-performance, pyinfra, infrastructure
Last push: 2026-08-25T07:27:11+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 83, longevity 100
- inputs: {"age_days": 4336, "days_push": 8, "days_rel": 37, "gap_med": 37, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5965, forks 539 (observed 2026-08-28T04:09:33.794500+00:00)

## What it is
pyinfra is an agentless infrastructure automation tool that turns Python code into shell commands and executes them over SSH, locally, or against Docker containers. It supports declarative, idempotent operations and scales from one server to thousands, positioning itself as a faster, Python-native alternative to Ansible.

## Use cases
- automate server provisioning with python instead of yaml
- run commands on many servers over ssh concurrently
- deploy nginx and services across a fleet of hosts
- manage docker container configuration from python
- dry-run infrastructure changes before applying them
- replace ansible with a faster python-based tool
- write idempotent deploy scripts in plain python

## When to choose
- you prefer Python over YAML for infrastructure code
- you need fast execution across hundreds or thousands of hosts
- you want agentless automation that only requires shell/SSH access
- you want to leverage the Python package ecosystem for custom operations
- you need instant debugging with realtime command output

## When to avoid
- your team is heavily invested in existing Ansible playbooks and roles
- you need a large marketplace of prebuilt community roles/modules
- you require Windows targets without shell access
- you want a GUI or fully declarative non-code configuration experience

## Facets
- artifact type: cli-tool
- maturity: active
- function: configuration-management, deployment, cli, developer-tools, infrastructure-as-code
- domain: cloud-computing, infrastructure-as-code, self-hosted
- platform: python, cli, cross-platform
- tags: ssh, agentless, ansible-alternative, provisioning, remote-execution, idempotent, docker-connector, server-automation, devops, automation, linux, macos

## Member repositories
- pyinfra-dev/pyinfra (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:33.794500+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:50:10.348421+00:00, confidence not recorded.
  - readme: https://github.com/pyinfra-dev/pyinfra (fetched 2026-08-28T04:09:33.794500+00:00, sha 2e7a22325d31)
  - homepage: https://pyinfra.com (fetched 2026-08-29T08:46:09.816223+00:00, sha 1aae446af893)
  - site_page: https://docs.pyinfra.com (fetched 2026-08-29T08:46:09.819029+00:00, sha d578c1a9c450)
  - site_page: https://docs.pyinfra.com/page/getting-started.html (fetched 2026-08-29T08:46:09.820697+00:00, sha b7d47dd577f5)
  - registry_pypi: https://pypi.org/pypi/pyinfra/json (fetched 2026-08-29T08:46:09.822653+00:00, sha a12a2542ca35)
- Data as of 2026-08-30T08:39:29.467469+00:00.
