Don't sleep on wrapture
Blog · Watch/Read · (gathered 2026-09-13)
- Simon Willison champions Graham Dumpleton’s new
wrapturepackage as an under-recognized, indispensable “Swiss Army Knife” for Python developers, combining monkey patching for both testing and observability. wraptureuniquely serves both unit testing (similar tounittest.mock) and New Relic-style live tracing, offering features like recording calls, phased behavior, and patching attributes, dictionaries, and generators.- It supports zero-code tracing via TOML configuration, integrates with a separate
wrapture-instrumentationpackage for popular frameworks (e.g., Flask, Django, FastAPI) and HTTP clients, helps find slow code, and supports OpenTelemetry export. - Despite being alpha software,
wraptureis “very usable” and can be explored without modifying existing Python code by using its TOML configuration, making it accessible for immediate experimentation.