HomeAI NewsGraham Dumpleton releases wrapture monkey patching library for Python

Graham Dumpleton releases wrapture monkey patching library for Python

New tutorials cover unit testing, live tracing, and zero-code instrumentation for Flask, Django, and FastAPI.

Graham Dumpleton released wrapture, a Python monkey patching library, on August 31. The package supports unit testing and observability tracing at the same time. Dumpleton has published new tutorials almost daily since the initial release, covering call recording, phased behaviour, live tracing, timing analysis, and OpenTelemetry export.

Simon Willison flagged the package on his weblog and noted the low buzz around it. Dumpleton built wrapture to serve both testing and observability use cases. The library competes conceptually with unittest.mock while adding tracing, call recording, and instrumentation that resembles New Relic style monitoring.

Builders can configure tracing through a TOML file without touching Python source code. The companion wrapture-instrumentation package supplies adapters for web frameworks, HTTP clients, databases, and RPC libraries including aiohttp, requests, httpx, SQLAlchemy, sqlite3, Jinja2, and gRPC. Teams that adopt it gain call timelines and timing data with minimal code changes.

Wrapture remains alpha software, so APIs may shift as Dumpleton iterates. Interactive JupyterLab workshops accompany the package for developers who want guided practice. Operators evaluating tracing or mocking tools should watch for a stable release and for expanded instrumentation coverage across additional frameworks and libraries.

What matters

  • Dumpleton published daily wrapture tutorials since the library’s August 31 release.
  • Wrapture handles monkey patching for testing and observability, replacing unittest.mock workflows.
  • The separate wrapture-instrumentation package ships adapters for Flask, Django, gRPC, and SQLAlchemy.

Why it matters

The separate wrapture-instrumentation package ships adapters for Flask, Django, gRPC, and SQLAlchemy.

This GenAI News article was prepared in original wording using reporting and materials published by Simon Willison’s Weblog. Source reference: https://simonwillison.net/2026/Sep/11/wrapture/.

Drafted by the GenAI News review pipeline.

latest articles

explore more