# GrahamDumpleton/wrapt

A Python module for decorators, wrappers and monkey patching.

Repository: https://github.com/GrahamDumpleton/wrapt
Canonical: https://ross.abutalabs.com/products/wrapt
Language: Python
License: BSD-2-Clause
License Family: permissive
Last push: 2026-08-21T03:00:46+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 83, longevity 100
- inputs: {"age_days": 4844, "days_push": 12, "days_rel": 36, "gap_med": 31, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2295, forks 252 (observed 2026-08-28T04:06:35.145189+00:00)

## What it is
wrapt is a Python module providing transparent object proxies for building function wrappers, decorators, and monkey patching utilities. It emphasizes correctness and introspection preservation, with a C extension for performance and a pure Python fallback.

## Use cases
- write decorators that preserve function signatures and metadata
- create universal decorators working on functions, methods, and classes
- safely monkey patch third-party code at runtime
- build transparent object proxies for wrapping arbitrary objects
- instrument libraries like APM tracers with minimal overhead

## When to choose
- you need decorators more correct and introspectable than functools.wraps allows
- you are building instrumentation, tracing, or patching libraries
- you need decorators that work uniformly across functions, methods, classmethods, and classes

## When to avoid
- you only need simple decorators and functools.wraps suffices
- you want a zero-dependency pure-Python solution without C extension considerations

## Facets
- artifact type: library
- maturity: stable
- function: middleware, developer-tools, concurrency
- domain: developer-tools, programming-languages
- platform: python, cross-platform
- tags: decorators, monkey-patching, object-proxy, function-wrappers, introspection

## Member repositories
- GrahamDumpleton/wrapt (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:35.145189+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:40:20.387796+00:00, confidence not recorded.
  - readme: https://github.com/GrahamDumpleton/wrapt (fetched 2026-08-28T04:06:35.145189+00:00, sha 6474533e22ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
