Server

Python

Automation, CLI tooling, packaging and scripting for operations.

Python articles

Python· 3 min read

pytest Fixtures and parametrize

Fixtures give tests their setup; parametrize runs one test over many inputs. Here's scope, composition, conftest.py, and the parametrize patterns that matter.

October 24, 2026
Python· 4 min read

Profiling Python Code

Don't guess at what's slow — measure. cProfile for a script, py-spy for a live process, memray for memory. Here's how to run each and read the output.

October 24, 2026
Python· 3 min read

Parsing Config Files Safely in Python

yaml.load can execute arbitrary code; tomllib is in the stdlib now. Here's how to load, layer, and validate configuration without surprises.

October 24, 2026
Python· 3 min read

virtualenv vs venv vs uv: Python Environments in 2026

venv ships with Python and is fine; uv is faster and does lockfiles and Python-version management too. Here's what each does and a modern default.

October 24, 2026
Python· 3 min read

subprocess Without Shell Injection

The single rule that prevents command injection in Python: pass a list, never a string, and never shell=True with untrusted input.

October 24, 2026
Python· 3 min read

Python Logging Configuration That Doesn't Hurt

Python's logging module is fine once you stop fighting it: configure once at the entry point, let libraries just call getLogger, and use dictConfig.

October 24, 2026
Python· 3 min read

Packaging a Python CLI

Turn a script into a `pip install`-able command: the pyproject.toml, the entry point, the src layout, and how users should install it.

October 24, 2026
Python· 3 min read

Python Type Hints That Actually Pay Off

Type hints earn their keep at function boundaries and data models. Here's a pragmatic subset, a CI setup, and how to adopt them on an untyped codebase.

October 24, 2026
Python· 3 min read

asyncio for I/O-Bound Scripts

Async Python shines for hundreds of concurrent network calls and nothing else. Here's a correct pattern for a bulk-fetch script, with concurrency limits and error handling.

October 24, 2026
Python· 3 min read

argparse Patterns for Real CLI Tools

The argparse recipes that cover most operational scripts: subcommands, env defaults, parent parsers, and exit codes.

October 24, 2026