fab.tools.category#
This simple module defines an Enum for all allowed categories.
Classes
|
This class defines the allowed tool categories. |
A meta class for a simple, enum-like Category class, that provides an API to allow to iterate over all categories. |
- class fab.tools.category.CategoryMeta#
A meta class for a simple, enum-like Category class, that provides an API to allow to iterate over all categories.
- class fab.tools.category.Category(name, value=None)#
This class defines the allowed tool categories. It presents an interface similar to a Python enum, but it allows to extend an enum.
A enum is created by just creating an instance, e.g.: Category(“PSYCLONE”) (and it is checked that all names are unique). This will create Category.PSYCLONE. It also allows iterating over all categories, e.g. for cat in Categories.
Creates the instance, and also sets it as class attribute of the Category class. The value parameter is only required for pickling (which is used when starting sub-processes)/
- Parameters: