--- id: decorator version: "5.3.1" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # decorator — Decorators for Humans License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install decorator uv add decorator poetry add decorator ## Description Decorators for Humans ===================== The goal of the decorator module is to make it easy to define signature-preserving function decorators and decorator factories. It also includes an implementation of multiple dispatch and other niceties (please check the docs). It is released under a two-clauses BSD license, i.e. basically you can do whatever you want with it but I am not responsible. Installation ------------- If you are lazy, just perform ``$ pip install decorator`` which will install just the module on your system. If you prefer to install the full distribution from source, including the documentation, clone the `GitHub repo`_ or download the tarball_, unpack it and run ``$ pip install .`` in the main directory, possibly as superuser. .. _tarball: https://pypi.org/project/decorator/#files .. _GitHub repo: https://github.com/micheles/decorator Testing -------- If you have the source code installation you can run the tests with `$ python tests/test.py -v` Notice that you may run into trouble if in your system there is an older version of the decorator module; in such a case remove the old version. It is safe even to copy the module `decorator.py`... ## AI interpretation — verify before relying Provides utilities for writing signature-preserving function decorators and decorator factories, including multiple dispatch support, without boilerplate. Verdict: A mature, well-maintained library (Production/Stable, active, zero known vulnerabilities) that solves a real pain point in Python decorator writing. Low install friction, permissive license, and broad Python version support make it a safe, practical choice for projects needing cleaner decorator syntax. [View on SkillFed](https://skillfed.io/packages/decorator) · [View on PyPI](https://pypi.org/project/decorator/)