$npx skillfedfor your agent

wrapt

Module for decorators, wrappers and monkey patching.

Worth itPyPI Released Jul 2026495.6M downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — wrapt-2.3.0-py3-none-any.whl
v2.3.0 · released 2026-07-28 · Python >=3.9

Yes. wrapt is a foundational library with active maintenance, no known vulnerabilities, low install friction, and permissive licensing. It is essential for anyone building decorators that must work reliably across all callable types and preserve introspection—a common requirement in frameworks, instrumentation, and testing tools.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; a C compiler is optional (pure Python fallback available).
  • Low friction installation with a pure-Python fallback; the package is actively maintained with a recent release and no known vulnerabilities.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive and poses no restrictions on commercial or proprietary use.

last release 2026-07-28 (17 days) · last repo commit 2026-08-13 · 2,294 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 495,611,441 downloads/mo, #81 on PyPI

Verify before relying

pip install wrapt

import wrapt

@wrapt.decorator
def my_decorator(wrapped, instance, args, kwargs):
    return wrapped(*args, **kwargs)

@my_decorator
def my_function():
    pass
Same gist for agents: .md · .json

What it is and what it does

wrapt is a mature decorator and object-proxy library that solves the problem of building decorators that work correctly across all Python callable types—functions, methods, classmethods, staticmethods, and classes—while preserving their signatures, annotations, and introspection capabilities. Unlike the standard library's functools.wraps, wrapt ensures that decorated callables behave predictably in edge cases and maintain their original metadata for tools like type checkers and documentation generators.

The package uses a C extension for performance-critical paths but falls back to pure Python when compilation is not available, making it portable across systems. It is commonly used as a foundation for building robust decorators in libraries and frameworks that need to wrap or intercept function calls without breaking introspection or type information.

Use it for

  • Building universal decorators that work identically on functions, instance methods, classmethods, and staticmethods without special-case code.
  • Creating instrumentation or monitoring decorators that preserve the wrapped function's signature for debugging and profiling tools.
  • Implementing transparent object proxies for lazy loading, caching, or access control without breaking isinstance checks or attribute access.
  • Monkey-patching library functions at runtime while maintaining correct behavior for introspection and type checking.
  • Wrapping async functions and coroutines while preserving their awaitable nature and metadata.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

wrapt is a foundational library with active maintenance, no known vulnerabilities, low install friction, and permissive licensing. It is essential for anyone building decorators that must work reliably across all callable types and preserve introspection—a common requirement in frameworks, instrumentation, and testing tools.

Install

wrapt on PyPI

Before you install

Low friction installation with a pure-Python fallback; the package is actively maintained with a recent release and no known vulnerabilities.

Requires Python 3.9 or later; a C compiler is optional (pure Python fallback available).

License in practice

BSD-2-Clause is permissive and poses no restrictions on commercial or proprietary use.

Quickstart

pip install wrapt

import wrapt

@wrapt.decorator
def my_decorator(wrapped, instance, args, kwargs):
    return wrapped(*args, **kwargs)

@my_decorator
def my_function():
    pass

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 17 days since the last release
Last repo commit
First released
Downloads495,611,441 / month, #81 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: wrapt-2.3.0-py3-none-any.whl

Tags

Capabilities
python decorators with signature preservationtransparent object proxyuniversal decorator frameworkfunction wrapper librarymonkey patching utilitiesintrospection-preserving decoratorsdecorator for methods and classmethods
Topics
decorator-frameworkintrospection-safemonkey-patching
PyPI keywords
wrapperproxydecorator

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “universal decorator framework”

  • wraptwrapt provides a Python module for building decorators, object…
  • udapiUdapi is a Python framework for reading, processing, and manipulating…
  • udtoolsValidates CoNLL-U format files against Universal Dependencies…

Give your agent the search over MCP, or paste the wish link into any chat.

Similar packages

autowrapt Skip
PyPI · Software Development · released Apr 2015

Autowrapt enables monkey patching of Python applications via setuptools entrypoints and environment variables, without modifying the application code itself.

BSD-3-Clausebuilds from sourceabandoned
223.2Kdownloads / mo
singleton-decorator Skip
PyPI · Testing · released Aug 2017

Provides a decorator that enforces singleton pattern on classes while preserving direct access to the underlying class for unit testing via the `__wrapped__` attribute.

copyleftbuilds from sourcedormant
542.0Kdownloads / mo
tightwrap Worth it
PyPI · Software Development · released Mar 2026

A drop-in replacement for `functools.wraps` that preserves static type information when wrapping functions, so type checkers see the wrapped function's actual signature instead of `*args, **kwargs`.

permissive licensepure Python · 3.8+
90.9Kdownloads / mo
undecorated With conditions
PyPI · Application Frameworks · released Mar 2017

Strips decorators from Python functions, methods, or classes to access the original undecorated implementation.

However, verify it works on your Python version (last tested on 3.6) and consider forking if you need future maintenance.

Apache-2.0pure Pythonabandoned
88.7Kdownloads / mo
fan-tools With conditions
PyPI · Software Development · released Oct 2024

A collection of internal testing utilities, async helpers, and operational tools including caching decorators, API URL builders, lazy-initialization metaclasses, Unix shell wrappers, JSON logging, metrics servers, and backup integrations.

MITpure Pythondormant
179.8Kdownloads / mo
sigtools With conditions
PyPI · Python Modules · released Oct 2022

Sigtools provides utilities to inspect and manipulate Python function signatures, including resolving signatures through decorators and creating introspectable wrappers that preserve signature information.

However, it is abandoned—no maintenance since October 2022.

MITpure Python · 3.6+abandoned
836.2Kdownloads / mo

See also botoinator · decopatch · decorator · makefun