Decorator Implementations¶
The decoratory package contains some “classic decorators” implemented in a general and pythonic way using decorators on base of the above Decorator Arguments Template from Pyc. 14. These implementations are easy to use and provide a code base for the next level of functional extensions. Each module implements a single design pattern:
This is an open list of modules that possibly will grow over time.
To illustrate usage and functionalities of the individual modules, both simple and more complex examples are presented. This supports a Quick-Start for simple and fast problem solving as well as suggests solution options for more difficult cases. Even if only one particular module is of interest, it is recommended to look at the previous examples as well.
The decoratory package is available from the PyPI.org online repository and can be downloaded and installed using the common pip installer.
pip install --upgrade decoratory
After installation, basic information about the package, the individual modules and their methods is also available from the command line.
python -m decoratory --help
In particular, there is a comprehensive unit test for each module, which
can be executed from the command line using the --test
option.
python -m decoratory --test
This and more applies to the overall package as well as to the individual module. Thus,
python -m decoratory --version
prints the version of the installed decoratory package while
python -m decoratory.multiton --copyright
displays the copyright statement of the multiton module and
python -m decoratory.multiton --license
its license model.
© Copyright 2020-, Martin Abel, eVation. All Rights Reserved. |