Graham Dumpleton released wrapture, a new Python monkey patching library designed for both unit testing and runtime observability/tracing. It supports zero-code tracing via TOML config, instruments major frameworks (Flask, Django, FastAPI, aiohttp, etc.) through a separate package, and can export traces to OpenTelemetry. Currently in alpha, it already includes interactive JupyterLab workshops and daily tutorial updates since its Aug 31 release.
Background
Python monkey patching libraries like wrapture bridge the gap between unit testing mocks and production-grade distributed tracing. The tool ecosystem has been dominated by approaches like unittest.mock for testing and separate APM solutions for observability.
- Source
- Simon Willison
- Published
- Sep 11, 2026 at 09:51 PM
- Score
- 6.0 / 10