parameter-decorators
Handy decorators for converting parameters
What it is and what it does
parameter-decorators is a small utility library that provides decorator functions to automatically convert function parameters from one type to another at call time. Instead of manually casting arguments inside your function, you decorate the function and specify which parameters should be converted and how. The example shows @str_to_path('input_file'), which converts a string argument to a Path object before the function receives it.
The package has no runtime dependencies and supports Python 3.7, 3.8, 3.9, 3.10, and 3.11. It is dormant—the last release was 2023-01-31, with no activity since 2023-10-03. The repository has minimal visibility (2 stars), suggesting it is either a personal utility or has seen limited adoption. The GNU General Public License Version 3 means any code that distributes this package must also be licensed under GPLv3.
Use it for:
- Decorate functions that accept file paths as strings to automatically convert them to Path objects for safer filesystem operations.
- Reduce boilerplate in functions that need to coerce arguments to specific types before processing.
- Apply consistent type conversions across multiple functions without repeating casting logic in each function body.
- Simplify function signatures by moving type-conversion logic into declarative decorators.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides decorators that automatically convert function parameters to specified types—for example, converting string arguments to Path objects without manual casting in the function body.
No, unless you have a specific need for parameter-conversion decorators and accept the GPLv3 copyleft constraint. The package is dormant with minimal community adoption, no recent maintenance, and limited documentation of its full decorator set. The single example shown is trivial to implement inline. Consider it only if you need a reusable decorator library and can commit to GPLv3 licensing.
Install
parameter-decorators on PyPI
pip
pip install parameter-decoratorsuv
uv add parameter-decoratorspoetry
poetry add parameter-decoratorsInstalling parameter-decorators
Before you install
Installation is straightforward with no runtime dependencies. However, the package is dormant—last updated 2023-01-31 with no commits since 2023-10-03, and the repository has only 2 stars, suggesting minimal community adoption or ongoing maintenance.
License in practice
Licensed under GNU General Public License Version 3, 29 June 2007, a copyleft license. If you distribute software using this package, you must license your entire work under GPLv3 and make source code available to recipients.
Quickstart
python3 -m pip install parameter-decorators
from parameter_decorators import str_to_path
@str_to_path('input_file')
def get_parent(input_file):
return input_file.parent
print(get_parent('/usr/bin/python'))
Verify before relying
- What specific parameter conversion decorators are included beyond str_to_path shown in the documentation excerpt.
- Whether the package handles edge cases like None values, type validation failures, or nested parameter structures.
- Performance characteristics when decorators are applied to functions with many parameters or called frequently.
Package facts
| License | GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license… (full text in the JSON record) (copyleft) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 314,895/month — #7,693 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: parameter_decorators-0.0.2-py2.py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pytest-parametrizationProvides decorator-based parametrization for…
permissive · top 15,000 on PyPI
python-utilsA collection of fully-typed utility functions…
permissive · top 5,000 on PyPI
makefunDynamically creates Python functions at runtime…
permissive · top 5,000 on PyPI
placPlac generates command-line interfaces from…
permissive · top 5,000 on PyPI
logdecoratorLogdecorator provides Python decorators to add…
permissive · top 15,000 on PyPI
multitaskingConverts Python methods into non-blocking,…
permissive · top 1,000 on PyPI
wireropeWraps Python callables (functions and methods)…
permissive · top 5,000 on PyPI
decoratorProvides utilities for writing function…
permissive · top 1,000 on PyPI
fastapi-decoratorsConverts functions into FastAPI-compatible…
permissive · top 15,000 on PyPI
decopatchDecopatch simplifies writing decorators in…
permissive · top 5,000 on PyPI