I have an Enum class in python. somthing like this.
class MyEnum(Enum):
attribute1 = "alpha/path/to/data1/"
attribute2 = "alpha/path/to/data2/"
in this class, "alpha" is hard-coded. but now I have a variable called ENVIRONMENT that its value is "alpha" or "beta" I want to use this variable in MyEnum attributes. how can I do this?
I searched and I found DynamicClassAttribute
class. but I didn't know how to use that