back to home

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.

4,869 stars
468 forks
206 issues
PythonShellJinja

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing pyinfra-dev/pyinfra in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/pyinfra-dev/pyinfra)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

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. Think ansible but Python instead of YAML, and a lot faster. --- Getting Started • Examples Repo • Chat on Matrix Documentation • Help & Support • Contributing --- Why pyinfra? Design features include: • šŸš€ **Super fast** execution over thousands of hosts with predictable performance. • 🚨 **Instant debugging** with realtime stdin/stdout/stderr output ( ). • šŸ”„ **Idempotent operations** that enable diffs and dry runs before making changes. • šŸ“¦ **Extendable** with the entire Python package ecosystem. • šŸ’» **Agentless execution** against anything with shell access. • šŸ”Œ **Integrated** with connectors for Docker, Terraform, Vagrant and more. Quickstart Install pyinfra with : Now you can execute commands on hosts via SSH: Or target Docker containers, the local machine, and other connectors: As well as executing commands you can define state using operations: Which can then be saved as a Python file like : The hosts can also be saved in a file, for example : And executed together: Now you know the building blocks of pyinfra! By combining inventory, operations and Python code you can deploy anything. See the more detailed getting started or using operations guides. See how to use inventory & data, global arguments and the CLI or check out the documented examples. ---