Python for Infrastructure — Trivia & Interesting Facts¶
Surprising, historical, and little-known facts about Python in infrastructure and DevOps.
Python was used for infrastructure before it was used for web development¶
Guido van Rossum created Python in 1991 as a system administration scripting language to replace ABC and Bourne shell for complex tasks. Python's first major infrastructure use was at CWI (the Dutch national research institute) for file management and system scripting. Web frameworks like Django (2005) and Flask (2010) came much later.
Ansible is written entirely in Python — and that is its secret weapon¶
Ansible (by Michael DeHaan, 2012) chose Python because it is installed by default on virtually every Linux distribution. Ansible modules execute on the target host using the system Python, requiring no agent installation. This "agentless" architecture was only possible because Python's ubiquity meant the runtime was already present. Chef (Ruby) and Puppet (Ruby/Clojure) required installing their own runtimes.
The subprocess module replaced five older modules¶
Python's subprocess module (added in Python 2.4, 2004) unified os.system, os.spawn, os.popen, popen2., and commands. into one coherent interface. Despite this, os.system() still appears in infrastructure code written in 2025. The subprocess.run() function (added in Python 3.5, 2015) further simplified the interface with a single function covering 90% of use cases.
Python's GIL does not matter for infrastructure code¶
The Global Interpreter Lock, which prevents true multi-threaded parallelism, is frequently cited as Python's biggest flaw. But infrastructure scripts are I/O-bound (waiting for SSH connections, API responses, file operations), not CPU-bound. I/O-bound code benefits from threading even with the GIL, and asyncio (Python 3.4, 2014) provides single-threaded concurrency for thousands of simultaneous network operations.
Fabric was the original "SSH for Python"¶
Fabric (by Jeff Forcier, 2008) was the first widely-adopted Python library for running commands over SSH. At its peak, it was used by thousands of teams as a lightweight deployment tool. Fabric 2.x (2018) was a complete rewrite that broke backward compatibility, causing the community to fragment toward Ansible, Paramiko, or Invoke. The transition was one of the most controversial in the Python infrastructure ecosystem.
pip did not exist until 2008¶
Before pip, Python packages were installed with easy_install (setuptools). pip (by Ian Bicking) was created in 2008 because easy_install could not uninstall packages. The name "pip" is a recursive acronym: "pip installs packages." Despite being the standard package manager, pip still does not resolve dependencies deterministically — that requires pip-tools, poetry, or uv.
Virtual environments were controversial when introduced¶
virtualenv (by Ian Bicking, 2007) solved Python's "single global package directory" problem. The idea that each project should have isolated dependencies was not immediately obvious — system administrators argued that system-wide packages were simpler. Python 3.3 (2012) added venv to the standard library, officially endorsing the pattern. Today, running pip install outside a venv triggers warnings.
Click powers most modern Python CLI tools¶
Click (by Armin Ronacher / Pallets, 2014) replaced argparse as the go-to library for building Python CLIs. It uses decorators (@click.command(), @click.option()) instead of imperative argument parsing. AWS CLI v2, Datasette, and hundreds of DevOps tools use Click. Its success proved that developer experience in library design matters as much as functionality.
Python replaced Perl as the "glue language" of infrastructure¶
In the 1990s and 2000s, Perl was the dominant scripting language for system administration. Python overtook Perl due to readability ("executable pseudocode"), better library ecosystem (especially for cloud APIs), and corporate backing (Google, Red Hat, Canonical all standardized on Python). Perl's TIMTOWTDI ("There's More Than One Way To Do It") philosophy lost to Python's "There should be one obvious way."
boto3 is the most-used AWS library in any language¶
boto3 (AWS SDK for Python, 2015) is the most popular AWS SDK across all programming languages, with over 1 billion downloads per month from PyPI. Nearly every AWS infrastructure tool — Terraform's AWS provider (Go, but designed alongside boto), CloudFormation scripts, Lambda functions, and CLI tools — either uses boto3 directly or was influenced by its API design.
uv is rewriting Python tooling in Rust¶
uv (by Astral, creators of Ruff, 2024) is a Python package installer and resolver written in Rust that is 10-100x faster than pip. It also replaces virtualenv, pip-tools, and pyenv. uv's speed comes from parallel downloads, compiled dependency resolution, and Rust's efficiency. This follows the broader trend of rewriting slow Python tools in Rust (Ruff replaced flake8+isort+black).