$npx skillfedfor your agent

decorator

Decorators for Humans

Worth itPyPI LibrariesReleased May 2026241.1M downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — decorator-5.3.1-py3-none-any.whl
v5.3.1 · released 2026-05-18 · Python >=3.8

Yes. This is a stable, zero-dependency utility that solves a real Python problem: signature-preserving decorators are tedious to write correctly by hand. The module is actively maintained, permissively licensed, and widely trusted in the ecosystem. Install it if you write decorators or need multiple dispatch; skip it only if you never use decorators or are willing to use functools.wraps manually.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with no runtime dependencies, installs instantly.
  • Actively maintained with a release within the last 88 days.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause (permissive): you can use, modify, and distribute freely with minimal restrictions; original license notice required.

last release 2026-05-18 (88 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 241,108,642 downloads/mo, #164 on PyPI

Verify before relying

pip install decorator

from decorator import decorator
import time

@decorator
def warn_slow(func, timelimit=60, *args, **kw):
    t0 = time.time()
    result = func(*args, **kw)
    dt = time.time() - t0
    if dt > timelimit:
        print(f'{func.__name__} took {dt} seconds')
    return result

@warn_slow(timelimit=5)
def my_function():
    pass
  • Whether multiple dispatch implementation is feature-complete or limited compared to dedicated dispatch libraries.
  • Performance characteristics when decorating functions with many arguments or complex signatures.
Same gist for agents: .md · .json

What it is and what it does

The decorator module solves the problem of writing function decorators that automatically preserve the original function's signature and metadata. When you write a decorator without this library, the decorated function loses its original `__name__`, `__doc__`, and parameter information—making debugging harder and breaking introspection-based tools. This module provides a `@decorator` wrapper that handles that preservation automatically, so your decorator can focus on its logic.

It also includes a multiple dispatch implementation and other utilities for decorator patterns. The package has no runtime dependencies, supports Python 3.8 through 3.14, and is classified as production-stable. It's widely used in the ecosystem (top 1000 by downloads) and has maintained backward compatibility since its early releases.

Use it for

  • Write timing or logging decorators that need to report the original function name and signature correctly.
  • Build decorator factories that accept parameters while preserving the decorated function's metadata.
  • Implement multiple dispatch (function overloading by argument type) in Python code.
  • Create retry or caching decorators that must preserve introspection for debugging and documentation.
  • Develop library decorators where users expect the decorated function to behave transparently in stack traces and help().

Worth the install?

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

Worth it

Yes.

This is a stable, zero-dependency utility that solves a real Python problem: signature-preserving decorators are tedious to write correctly by hand. The module is actively maintained, permissively licensed, and widely trusted in the ecosystem. Install it if you write decorators or need multiple dispatch; skip it only if you never use decorators or are willing to use functools.wraps manually.

Install

decorator on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies, installs instantly. Actively maintained with a release within the last 88 days.

License in practice

BSD-2-Clause (permissive): you can use, modify, and distribute freely with minimal restrictions; original license notice required.

Quickstart

pip install decorator

from decorator import decorator
import time

@decorator
def warn_slow(func, timelimit=60, *args, **kw):
    t0 = time.time()
    result = func(*args, **kw)
    dt = time.time() - t0
    if dt > timelimit:
        print(f'{func.__name__} took {dt} seconds')
    return result

@warn_slow(timelimit=5)
def my_function():
    pass

Verify before relying

  • Whether multiple dispatch implementation is feature-complete or limited compared to dedicated dispatch libraries.
  • Performance characteristics when decorating functions with many arguments or complex signatures.

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 88 days since the last release
First released
Downloads241,108,642 / month, #164 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: LibrariesTopic :: Utilities

Evidence: decorator-5.3.1-py3-none-any.whl

Tags

Capabilities
signature-preserving decoratorsfunction decorator librarydecorator factory utilitiesmultiple dispatch pythondecorator implementation helperspreserve function signaturedecorator pattern tools
Topics
decoratorsmetaprogrammingdispatch
PyPI keywords
decorators

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 › “signature-preserving decorators”

  • decoratorProvides utilities for writing function decorators that preserve the…
  • django-decorator-includeApplies decorators to Django URL patterns included from other…
  • fastapi-decoratorsConverts functions into FastAPI-compatible decorators that can inject…

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

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also decopatch · wrapt · multimethod · sigtools · makefun · fastapi-decorators · undecorated · methoddispatch · essentials · venusian