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

Introducing wrapture

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

  • wrapture is a new Python library by Graham Dumpleton that extends wrapt’s monkeypatching ideas to provide a unified solution for both testing (as an alternative to unittest.mock) and observability/tracing, allowing easy wrapping of functions/methods to trace access or override return values.
  • It includes OpenTelemetry support and a configuration-based mechanism for adding tracing to existing projects, alongside advanced testing patterns like stubbing return values (on_call.returns) and transforming results (transforms_result).
  • Notably, wrapture was entirely written by an AI assistant under Graham Dumpleton’s “agent-driven” direction, emphasizing that human design and expertise guided the AI’s implementation, distinguishing it from “vibe coding.”