parameter-decorators
Handy decorators for converting parameters
Installation
Install the last released version using pip
:
python3 -m pip install -U parameter-decorators
Or install the latest version from sources:
git clone git@github.com:matan1008/parameter-decorators.git
cd parameter-decorators
python3 -m pip install -U -e .
Usage
The package contains several handy decorators, lets give an example with str_to_path
:
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'))