--- id: wrapt version: "2.3.0" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # wrapt — Module for decorators, wrappers and monkey patching. License: permissive · Maintenance: active · Popularity: top 100 on PyPI ## Install pip install wrapt uv add wrapt poetry add wrapt ## Description wrapt ===== |PyPI| |Documentation| A Python module for decorators, wrappers and monkey patching. Overview -------- The **wrapt** module provides a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions. The **wrapt** module focuses very much on correctness. It goes way beyond existing mechanisms such as ``functools.wraps()`` to ensure that decorators preserve introspectability, signatures, type checking abilities etc. The decorators that can be constructed using this module will work in far more scenarios than typical decorators and provide more predictable and consistent behaviour. To ensure that the overhead is as minimal as possible, a C extension module is used for performance critical components. An automatic fallback to a pure Python implementation is also provided where a target system does not have a compiler to allow the C extension to be compiled. Key Features ------------ * **Universal decorators** that work with functions, methods, classmethods, staticmethods, and classes * **Transparent object proxies** for advanced wrapping scenarios * **Monkey patching utilities** for safe... ## AI interpretation — verify before relying wrapt provides a transparent object proxy and decorator framework that preserves function signatures, introspection, and type information across functions, methods, classmethods, staticmethods, and classes, with optional C acceleration. Verdict: wrapt is a mature, actively maintained decorator library in the top 100 PyPI packages with zero known vulnerabilities. It solves real problems with Python's standard decorator mechanisms—preserving signatures and introspection—and offers both C and pure-Python implementations. Permissive BSD-2-Clause license and low install friction make it a safe, production-ready choice. [View on SkillFed](https://skillfed.io/packages/wrapt) · [View on PyPI](https://pypi.org/project/wrapt/)