↓Skip to main content
Zeitgeist — a spike by Chris Gathercole
  1. Creators/
  2. Simon Willison — Creator of Datasette; co-creator of Django/

Don't sleep on wrapture

Blog · Watch/Read · (gathered 2026-09-13)

  • Simon Willison champions Graham Dumpleton’s new wrapture package as an under-recognized, indispensable “Swiss Army Knife” for Python developers, combining monkey patching for both testing and observability.
  • wrapture uniquely serves both unit testing (similar to unittest.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-instrumentation package for popular frameworks (e.g., Flask, Django, FastAPI) and HTTP clients, helps find slow code, and supports OpenTelemetry export.
  • Despite being alpha software, wrapture is “very usable” and can be explored without modifying existing Python code by using its TOML configuration, making it accessible for immediate experimentation.