fill_enum

Decorator to automatically create Enum with filled values


License
MIT
Install
pip install fill_enum==0.1.0

Documentation

libqtum

GitHub license PyPI Version

This Decorator returns an Enum, which contains all values in values.

Values, which the passed class not include, will be auto generated with prefix + value as name if they are in the values list.

Args: values: An iterable list of values for the Enum members. enum_cls: The Enum class or a subclass of it. prefix: The prefix for the name of the auto generated Enum members. *args: Will be passed to the enum_cls constructor. **kwargs: Will be passed to the enum_cls constructor.

Gitlab Snippet

Original Blog Post