$npx skillfedfor your agent

tightwrap

A typed `functools.wraps`.

Worth itPyPI Software DevelopmentReleased Mar 202690.9K downloads / moApache2Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — tightwrap-26.1.0-py3-none-any.whl
v26.1.0 · released 2026-03-04 · Python >=3.8 · 1 runtime deps: typing-extensions

Yes. If you write decorators or function wrappers and use a static type checker, this is a straightforward win: it fixes a real gap in `functools.wraps` with zero complexity, no security issues, active maintenance, and a permissive license. If you don't use type checking or don't write wrappers, you don't need it.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only `typing-extensions` as a runtime dependency.
  • Actively maintained with recent releases supporting Python 3.13 and 3.14.

License · maintenance · safety

Apache2 (permissive) — Apache 2.0 (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2026-03-04 (163 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,943 downloads/mo, #13,554 on PyPI

Verify before relying

pip install tightwrap

from tightwrap import wraps

def original(a: int) -> int:
    return a + 1

@wraps(original)
def wrapper(*args, **kwargs) -> int:
    return original(*args, **kwargs)
  • Whether the package is suitable for all decorator patterns (e.g., class decorators, async functions, partial application).
  • Performance characteristics compared to `functools.wraps` for high-frequency wrapping scenarios.
Same gist for agents: .md · .json

What it is and what it does

tightwrap is a minimal library that solves a specific typing problem: when you use `functools.wraps` to decorate a function, static type checkers like mypy lose the original function's signature and see only `*args, **kwargs`. This breaks type safety—a caller can pass the wrong types and the checker won't catch it. tightwrap.wraps has the same runtime behavior as `functools.wraps` but preserves the wrapped function's type signature for static analysis, so type checkers correctly report signature mismatches.

The package is intentionally small and has only one runtime dependency (`typing-extensions`). It applies `functools.wraps` under the hood to maintain runtime introspection compatibility, and it handles cases where the wrapper has a different return type than the wrapped function. Recent versions add support for wrapping methods and modern Python versions (3.13, 3.14).

Use it for

  • Wrapping functions in decorators while maintaining type safety for static analysis.
  • Building decorator libraries where callers should see the original function's signature in their IDE and type checker.
  • Ensuring runtime function metadata (name, docstring, annotations) stays accurate while preserving type hints.
  • Wrapping methods in classes with correct typing for both static checkers and runtime introspection.

Worth the install?

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

Worth it

Yes.

If you write decorators or function wrappers and use a static type checker, this is a straightforward win: it fixes a real gap in `functools.wraps` with zero complexity, no security issues, active maintenance, and a permissive license. If you don't use type checking or don't write wrappers, you don't need it.

Install

tightwrap on PyPI

Before you install

Low friction: pure Python wheel with only `typing-extensions` as a runtime dependency. Actively maintained with recent releases supporting Python 3.13 and 3.14.

License in practice

Apache 2.0 (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install tightwrap

from tightwrap import wraps

def original(a: int) -> int:
    return a + 1

@wraps(original)
def wrapper(*args, **kwargs) -> int:
    return original(*args, **kwargs)

Verify before relying

  • Whether the package is suitable for all decorator patterns (e.g., class decorators, async functions, partial application).
  • Performance characteristics compared to `functools.wraps` for high-frequency wrapping scenarios.

Package facts

LicenseApache2 permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typing-extensions
MaintenanceActively maintained 163 days since the last release
First released
Downloads90,943 / month, #13,554 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTyping :: Typed

Evidence: tightwrap-26.1.0-py3-none-any.whl

Tags

Capabilities
typed function wrapperfunctools.wraps typingstatic type preservation wrappingdecorator type hintsmypy-compatible wrapsfunction wrapper static typestyped decorator helper
Topics
typingdecorators

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 › “typed function wrapper”

  • tightwrapA drop-in replacement for `functools.wraps` that preserves static…
  • argdanticBuilds typed command-line interfaces by combining argparse with…
  • wrapsProvides type-safe wrapper types for representing values that may be…

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

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also wraps · wrapt · decopatch · singleton-decorator · django-types · undecorated · singledispatch · types-decorator · joblib-stubs · mo-kwargs