Pyinfra – simple infrastructure automation in Python Adrian, a Python developer and maintainer of the reader feed library, demonstrated pyinfra, an open-source infrastructure automation tool that turns Python code into shell commands and runs them on many servers over SSH in parallel, at a local DevOps meetup in November 2026. The demo deployed two websites — a landing page and a Python web app — first on a local virtual machine and then on two remote servers using only Python code. Adrian said pyinfra is declarative and idempotent like Ansible but uses Python instead of YAML, and in his limited small-scale testing it was faster than Ansible with the Mitogen plugin, though pyinfra has fewer built-in operations and a smaller ecosystem after 10 years. pyinfra – simple infrastructure automation in Python November 2026 ∙ 15 minute read ∙ Hi, I'm Adrian, and today I will live demo pyinfra https://pyinfra.com/ , an infrastructure automation tool. We will deploy two websites – a landing page and a Python web app – first on a local virtual machine, and then on two remote servers, using only Python code. Note This is the edited transcript of a talk I gave at a local DevOps meetup. While part of the "live" aspect is lost in writing, I think it's a pretty decent pyinfra tutorial, so you are welcome to follow along at home. About me about-me Before we talk about pyinfra, I should introduce myself https://death.andgravity.com/about . I worked at a Fortune 10 company for most of my career, where I did site reliability engineering for the reverse proxy behind some really big websites and two thousand smaller ones, and where I built a data-lake-plus-feature-store for an ML organization. In my spare time, I write about Python on this website https://death.andgravity.com/ , and I maintain the creatively named reader https://github.com/lemon24/reader , a Python feed reader library and web app. Lately I've been working on a hosted version of reader https://death.andgravity.com/reader-3-23 hosted-reader-status-update , which is how I ended up using pyinfra. What is pyinfra? what-is-pyinfra pyinfra https://pyinfra.com/ is a mostly command-line tool that turns Python code into shell commands and runs them on many servers over SSH, in parallel. Think Ansible, but simpler. for user in 'admin', 'alice', 'bob' : server.user user files.put 'files/hello.txt', '/etc/motd' if host.data.get 'install postgres' : apt.install 'postgresql' Why use pyinfra? why-use-pyinfra I chose pyinfra because, like Ansible