All Posts

Back to Home

Explore all 204 posts about Python, WSGI, web development, Kubernetes, Docker and more.

Muru: scaling from what the workers report

How the Muru daemon decides how many workers a release needs, and the diagnosis that says when the answer isn't more workers but a change to the release.

python muru scaling

Muru: working with Kubernetes, not around it

Running muructl serve on Kubernetes: a shutdown delay instead of a preStop hook, restarts in place, autoscaling on busy worker slots rather than CPU, and migrations as a Job.

python muru kubernetes

Muru: a better tenant in a container

What muructl serve does as a container's main process: workers set to fit the container, a guard on its memory, probes on their own port, an orderly SIGTERM, and a read-only root.

python muru docker

Muru: canaries without a service mesh

Canary releases under the Muru daemon, where a new release gets a share of the traffic, is judged against the release already serving, and is rolled back by itself if worse.

python muru deployment

Muru: releases, not restarts

Deploying to the Muru daemon, where each deploy starts a new release beside the old one, rolling back is a routing change, and two releases can share a database.

python muru deployment

AI as a lifestyle choice

What building software with AI looks like as I edge towards retirement, why all software starts out as mud, and why I would like to hear what you never had time to build.

ai muru python

Muru: WSGI and ASGI together

Adding websockets to an existing WSGI application with Muru, by handing requests to ASGI in the same worker, plus mounting ASGI beside WSGI and serving gRPC.

python muru wsgi asgi

Muru: HTTPS in development

How a Muru development run serves HTTPS with a certificate your browser trusts, so HTTP/2, Secure cookies and URL schemes can be tested without a proxy in front.

python muru wsgi

Muru: import once, fork many

How Muru imports a Python web application once and forks workers from it, checks the import is safe to fork, and how processes, threads and free-threading fit in.

python muru

Muru: how it fits together

The processes that make up Muru, the path a request takes through them, and why splitting things up this way is what makes releases and zero-downtime deploys possible.

python muru

Muru: looking inside the workers

Catching a slow request with a soft timeout, seeing where it is with debug stacks, profiling under load and attaching a debugger, all against a Muru development run.

python muru

A first look at Muru

Muru running for the first time, in development mode. Serving a WSGI application, what the terminal tells you, what happens when it fails, and why a reload is a release.

python muru wsgi

Twenty years of mod_wsgi, and what comes next

Twenty years on from starting mod_wsgi, I am revisiting Python web hosting without the constraints of Apache. This is where Muru comes from and where it is going.

python mod_wsgi muru ai

AI slop is the new TLDR

Calling AI generated code slop often says less about the code than about our willingness to read it. Why it feels like onboarding every day, and how I cope.

ai educates

Getting to know Tachyon

A set of hands-on JupyterLab workshops for Tachyon, the sampling profiler in Python 3.15, and the story of why I wrote them to learn it myself.

python profiling jupyter wrapture

A master class in decorators, patching and tracing

Seventy free hands-on workshops, from writing decorators with just the standard library through wrapt to testing and tracing with wrapture. Nothing to install.

python decorators wrapt wrapture

Writing a workshop for JupyterLab

Writing a small guided workshop for JupyterLab from nothing with jupyterlab-workshop: the manifest, pages, actions, checks, linting, self-testing and author mode.

jupyter jupyterlab-workshop

Introducing jupyterlab-workshop

A JupyterLab extension for guided interactive workshops, with instructions in a side panel whose actions drive the session and check the learner's work as they go.

jupyter jupyterlab-workshop educates

Hands-on learning in the age of AI

A summary of my PyCon AU 2026 talk on whether developer workshops still matter when anyone can ask an AI, and why I released 24 wrapture workshops anyway.

pycon educates wrapture

Trying out wrapture

wrapture and its instrumentation packages are now at 1.0.0b1 with the API settled. A summary of the posts so far, the packages, the docs, and 24 workshops you can run in your browser on mybinder...

python wrapture testing tracing +1 more

OpenTelemetry export in wrapture

The same events that print a tree or fill a file can feed an OpenTelemetry backend while the application runs, with one trace id shared across files, headers and spans.

python wrapture tracing opentelemetry

Finding slow code with wrapture

One endpoint is slow and there are three layers it could be. Self time for the handful of methods you chose answers the question without a profiler and without a stopwatch in every layer.

python wrapture tracing performance

Tracing Flask with wrapture

One HTTP request as one tree, from a single config entry, with the failing request saying both that it answered 500 and why.

python wrapture tracing flask

Zero-code tracing with wrapture

Tracing an application you cannot or should not edit: the bindings and sink move into a TOML file next to the project, and the program runs untouched.

python wrapture tracing

Live tracing with wrapture

The bindings used to test a piece of code are the same objects that trace it. Take away the timeline, register a sink, and a running program narrates itself.

python wrapture tracing

Beyond callables in wrapture

What a wrapture binding can name that is not a call: attribute reads and writes, values held in place for a test, the content of a settings dict, callables in a registry, and generators consumed...

python wrapture testing

Phased behaviour in wrapture

Testing retry logic, circuit breakers and polling loops with wrapture's phases, where a binding's behaviour changes on a count, a condition, an exhausted sequence, or a signal from elsewhere.

python wrapture testing

Recording calls with wrapture

How wrapture's timeline and tape record what real code did, and how to filter, assert on and walk that record. Worked through on a resource leak that no return value reveals.

python wrapture testing

Unit testing with wrapture

The same unit tests written with unittest.mock and with wrapture, focusing on the cases where wrapping the real code rather than replacing it changes what a test can say.

python wrapture testing

Introducing wrapture

wrapture is a new Python package for monkey patching, testing and tracing built on wrapt, written by an AI under my direction. What it does, why I built it, and what happens next.

python wrapture testing ai

Free-threading vs the GIL in mod_wsgi 6.0.0

Free-threading in mod_wsgi 6.0.0 lets a single process spread Python work across multiple cores. A metrics comparison against the GIL-enabled benchmarks from before.

python mod_wsgi wsgi apache

WSGISwitchInterval in mod_wsgi 6.0.0

mod_wsgi 6.0.0 adds WSGISwitchInterval, a tuning lever for Python's GIL switch interval. With proper telemetry it can deliver large gains on CPU-bound workloads.

python mod_wsgi wsgi apache

Free-threading in mod_wsgi 6.0.0

mod_wsgi 6.0.0 adds WSGIFreeThreading, an opt-in directive for PEP 703 free-threaded Python. GIL-enabled mode remains the default even on free-threaded builds.

python mod_wsgi wsgi apache

Per-interpreter GIL in mod_wsgi 6.0.0

mod_wsgi 6.0.0 adds WSGIPerInterpreterGIL, an opt-in directive for running sub-interpreters with their own GIL (PEP 684) for parallel Python in one process.

python mod_wsgi wsgi apache

Async support for wrapt.synchronized

How wrapt 2.2.0 extends the synchronized decorator and context manager to async functions, and why reentrancy is not supported on the async side.

python wrapt decorators asyncio

Lazy monkey patching with wrapt

Deferred monkey patching has been in wrapt for years. Python 3.15's lazy imports make it the right default for instrumentation libraries.

python wrapt decorators

Per-instance lru_cache using wrapt

How wrapt 2.2.0's lru_cache helper builds on top of functools.lru_cache to fix the issues with using it on instance methods.

python wrapt decorators

Stateful decorators in wrapt

A walkthrough of the new bind_state_to_wrapper helper in wrapt 2.2.0 and how it makes stateful decorators in Python easier to write.

python wrapt decorators

When AI content isn't slop

The backlash against AI slop is justified, but risks dismissing purposeful content along with the noise.

ai educates