{"id":13468756,"url":"https://github.com/pyinfra-dev/pyinfra","last_synced_at":"2026-04-09T03:32:01.089Z","repository":{"id":22107488,"uuid":"25437858","full_name":"pyinfra-dev/pyinfra","owner":"pyinfra-dev","description":"🔧 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.","archived":false,"fork":false,"pushed_at":"2026-03-30T21:18:23.000Z","size":22763,"stargazers_count":4915,"open_issues_count":217,"forks_count":477,"subscribers_count":36,"default_branch":"3.x","last_synced_at":"2026-03-30T23:36:52.051Z","etag":null,"topics":["cloud-management","configuration-management","high-performance","infrastructure","pyinfra","python","remote-execution"],"latest_commit_sha":null,"homepage":"https://pyinfra.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyinfra-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"fizzadar"}},"created_at":"2014-10-19T19:37:45.000Z","updated_at":"2026-03-30T21:18:30.000Z","dependencies_parsed_at":"2024-02-22T10:36:56.626Z","dependency_job_id":"0dd5859f-bb34-4425-a912-16ba869d5376","html_url":"https://github.com/pyinfra-dev/pyinfra","commit_stats":{"total_commits":3645,"total_committers":94,"mean_commits":"38.776595744680854","dds":0.4705075445816187,"last_synced_commit":"51c48de09adcc7b8e9ee5da7b56b44f230cc30a0"},"previous_names":["fizzadar/pyinfra"],"tags_count":224,"template":false,"template_full_name":null,"purl":"pkg:github/pyinfra-dev/pyinfra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyinfra-dev%2Fpyinfra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyinfra-dev%2Fpyinfra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyinfra-dev%2Fpyinfra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyinfra-dev%2Fpyinfra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyinfra-dev","download_url":"https://codeload.github.com/pyinfra-dev/pyinfra/tar.gz/refs/heads/3.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyinfra-dev%2Fpyinfra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-management","configuration-management","high-performance","infrastructure","pyinfra","python","remote-execution"],"created_at":"2024-07-31T15:01:18.351Z","updated_at":"2026-04-09T03:32:01.061Z","avatar_url":"https://github.com/pyinfra-dev.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pyinfra.com\"\u003e\n        \u003cimg src=\"https://pyinfra.com/static/logo_readme.png\" alt=\"pyinfra\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n    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 \u003ccode\u003eansible\u003c/code\u003e but Python instead of YAML, and a lot faster.\n\u003c/p\u003e\n\n---\n\n\u003ch3\u003e\n    \u003ca href=\"https://docs.pyinfra.com/page/getting-started.html\"\u003e\u003cstrong\u003eGetting Started\u003c/strong\u003e\u003c/a\u003e \u0026bull;\n    \u003ca href=\"https://github.com/pyinfra-dev/pyinfra-examples\"\u003e\u003cstrong\u003eExamples Repo\u003c/strong\u003e\u003c/a\u003e \u0026bull;\n    \u003ca href=\"https://matrix.to/#/#pyinfra:matrix.org\"\u003e\u003cstrong\u003eChat on Matrix\u003c/strong\u003e\u003c/a\u003e\n\u003c/h3\u003e\n\u003cp\u003e\n    \u003ca href=\"https://docs.pyinfra.com\"\u003e\u003cstrong\u003eDocumentation\u003c/strong\u003e\u003c/a\u003e \u0026bull;\n    \u003ca href=\"https://docs.pyinfra.com/page/support.html\"\u003e\u003cstrong\u003eHelp \u0026 Support\u003c/strong\u003e\u003c/a\u003e \u0026bull;\n    \u003ca href=\"https://docs.pyinfra.com/page/contributing.html\"\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nWhy pyinfra? Design features include:\n\n+ 🚀 **Super fast** execution over thousands of hosts with predictable performance.\n+ 🚨 **Instant debugging** with realtime stdin/stdout/stderr output (`-vvv`).\n+ 🔄 **Idempotent operations** that enable diffs and dry runs before making changes.\n+ 📦 **Extendable** with the entire Python package ecosystem.\n+ 💻 **Agentless execution** against anything with shell access.\n+ 🔌 **Integrated** with connectors for Docker, Terraform, Vagrant and more.\n\n\u003cimg width=\"100%\" src=\"https://pyinfra.com/static/example_deploy.gif\" /\u003e\n\n## Quickstart\n\nInstall pyinfra with [`uv`](https://docs.astral.sh/uv/):\n\n```\nuv tool install pyinfra\n```\n\nNow you can execute commands on hosts via SSH:\n\n```sh\npyinfra my-server.net exec -- echo \"hello world\"\n```\n\nOr target Docker containers, the local machine, and other [connectors](https://docs.pyinfra.com/page/connectors.html):\n\n```sh\npyinfra @docker/ubuntu exec -- echo \"Hello world\"\npyinfra @local exec -- echo \"Hello world\"\n```\n\nAs well as executing commands you can define state using [operations](https://docs.pyinfra.com/page/operations.html):\n\n```sh\n# Install iftop apt package if not present\npyinfra @docker/ubuntu apt.packages iftop update=true _sudo=true\n```\n\nWhich can then be saved as a Python file like `deploy.py`:\n\n\n```py\nfrom pyinfra.operations import apt\n\napt.packages(\n    name=\"Ensure iftop is installed\",\n    packages=['iftop'],\n    update=True,\n    _sudo=True,\n)\n```\n\nThe hosts can also be saved in a file, for example `inventory.py`:\n\n```py\ntargets = [\"@docker/ubuntu\", \"my-test-server.net\"]\n```\n\n\nAnd executed together:\n\n```sh\npyinfra inventory.py deploy.py\n```\n\nNow you know the building blocks of pyinfra! By combining inventory, operations and Python code you can deploy anything.\n\nSee the more detailed [getting started](https://docs.pyinfra.com/page/getting-started.html) or [using operations](https://docs.pyinfra.com/page/using-operations.html) guides. See how to use [inventory \u0026 data](https://docs.pyinfra.com/page/inventory-data.html), [global arguments](https://docs.pyinfra.com/page/arguments.html) and [the CLI](https://docs.pyinfra.com/page/cli.html) or check out the [documented examples](https://docs.pyinfra.com/page/examples.html).\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/pyinfra\"\u003e\u003cimg alt=\"PyPI version\" src=\"https://img.shields.io/pypi/v/pyinfra?color=blue\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pepy.tech/project/pyinfra\"\u003e\u003cimg alt=\"PyPi downloads\" src=\"https://pepy.tech/badge/pyinfra\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.pyinfra.com\"\u003e\u003cimg alt=\"Docs status\" src=\"https://img.shields.io/github/actions/workflow/status/Fizzadar/pyinfra/docs.yml?branch=2.x\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Fizzadar/pyinfra/actions?query=workflow%3A%22Execute+tests%22\"\u003e\u003cimg alt=\"Execute tests status\" src=\"https://img.shields.io/github/actions/workflow/status/Fizzadar/pyinfra/test.yml?branch=2.x\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/github/Fizzadar/pyinfra\"\u003e\u003cimg alt=\"Codecov Coverage\" src=\"https://img.shields.io/codecov/c/gh/Fizzadar/pyinfra\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Fizzadar/pyinfra/blob/2.x/LICENSE.md\"\u003e\u003cimg alt=\"MIT Licensed\" src=\"https://img.shields.io/pypi/l/pyinfra\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":["https://github.com/sponsors/fizzadar"],"categories":["Python","DevOps工具","HarmonyOS","DevOps Tools","Infrastructure \u0026 DevOps"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyinfra-dev%2Fpyinfra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyinfra-dev%2Fpyinfra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyinfra-dev%2Fpyinfra/lists"}