--- id: makefun version: "1.16.0" license: BSD 3-Clause license_treatment: permissive maintenance: aging --- # makefun — Small library to dynamically create python functions. License: permissive · Maintenance: aging · Downloads: 17.9M/mo ## What it is and what it does makefun is a small library for programmatically creating Python functions with custom signatures at runtime. It solves the problem of generating wrapper functions and decorators without writing repetitive boilerplate code—useful when you need to preserve or modify function signatures dynamically, such as in testing frameworks, metaprogramming, or API wrappers. The package depends only on funcsigs and is classified as Production/Stable. It supports Python 3.9 through 3.13 and is positioned as a developer tool for building other libraries and frameworks that need to generate functions on the fly. Use it for: - Creating decorators that preserve the original function's signature for better introspection and documentation. - Building test fixtures or mocks that need to match the exact signature of functions they replace. - Generating wrapper functions programmatically in metaprogramming or code generation scenarios. - Building API client libraries that dynamically create methods matching remote service signatures. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Dynamically creates Python functions at runtime with custom signatures, enabling programmatic generation of wrapper functions and decorators without manual boilerplate. Yes. The package is stable, has low install friction, carries no known vulnerabilities, and solves a specific metaprogramming need cleanly. Its single dependency and permissive license make it safe to include. The aging maintenance status (462 days since release) is not a blocker for a mature, focused library, but verify it meets your Python version and use-case requirements before adopting. ## Install pip install makefun uv add makefun poetry add makefun ## Installing makefun Before you install: Low friction install with a single lightweight dependency (funcsigs). Last release was recent (2025-05-09) and the repository remains active with a commit as recent as 2025-05-14, though the package is aging relative to its first release in 2019. License in practice: BSD 3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install makefun from makefun import wraps @wraps(original_function) def wrapper(*args, **kwargs): return original_function(*args, **kwargs) Verify before relying: - Whether the package's aging status (462 days since last release) affects stability or feature completeness for current Python versions. - Specific use cases where dynamic function generation is preferable to alternatives like functools.wraps or inspect-based approaches. ## Package facts - License: BSD 3-Clause (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 17.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags dynamic function generation, create functions at runtime, programmatic function signatures, decorator wrapper generation, function factory library, metaprogramming, function-generation, decorator-tools [View on SkillFed](https://skillfed.io/packages/makefun) · [View on PyPI](https://pypi.org/project/makefun/)