skillfed

parameter-decorators

Handy decorators for converting parameters

parameter-decorators v0.0.2 314.9K downloads/30d#7,693 on PyPI2
Copyleft 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) DORMANT released

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-decorators

uv

uv add parameter-decorators

poetry

poetry add parameter-decorators

Installing 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

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

parameter type conversion decoratorsautomatic argument castingfunction parameter decoratorsconvert function argumentsdecorator-based type conversionparameter transformationargument preprocessing decorators
decoratortype-conversion

More Software Development packages