Const¶
Constants.
Contains constants that AutoDist uses as well as user-settable Environment Variables that influence AutoDist behavior.
-
class
ENV
(value)[source]¶ Bases:
enum.Enum
AutoDist Environment Variables.
Note: If there’s a cleaner/better way to do this, please do it.
This is an Enum because in some instances we need to access the name field of a property. AFAIK, if we were to do this with normal variables this would require using inspect.
Since we use each environment variable in such different ways, we just make the enum value a lambda that will be called by our own val property.
For example, we want AUTODIST_IS_TESTING to be a bool (True or False) depending on the string set as an environment variable, so the lambda returns a comparison of the string and “True”.