rxn.utilities.types.RxnEnum
- class rxn.utilities.types.RxnEnum(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
Custom enum with additional functions for string conversion.
Has the following functionality compared to a standard Enum: * to_string() to generate a lowercase representation of the instance. * from_string(value) to instantiate from a string. * Constructor is valid both with a string and with another enum instance.
- __init__(*args, **kwds)
Methods
Convert the enum to a string representation (all lowercase).
from_string
(value)Construct the enum from a string, i.e. from the the strings of its possible values.