Open SourceSimon Willison

Introducing wrapture

#python#testing#tracing#opentelemetry#monkey-patching

English

Graham Dumpleton has introduced Wrapture, a new library that extends the monkeypatching concepts from wrapt to facilitate testing and tracing in Python. It allows users to trace function calls and modify return values without altering the original program, and it supports OpenTelemetry for easy integration into existing projects.

中文

Graham Dumpleton 推出了 Wrapture,这是一个新库,扩展了来自 wrapt 的猴子补丁概念,以便在 Python 中促进测试和追踪。它允许用户在不更改原始程序的情况下追踪函数调用并修改返回值,并支持 OpenTelemetry 以便轻松集成到现有项目中。