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”.

AUTODIST_WORKER = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_STRATEGY_ID = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_MIN_LOG_LEVEL = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_IS_TESTING = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_DEBUG_REMOTE = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_PATCH_TF = (<enum.auto object>, <function ENV.<lambda>>)[source]
AUTODIST_INTERNAL_TF = (<enum.auto object>, <function ENV.<lambda>>)[source]
SYS_DATA_PATH = (<enum.auto object>, <function ENV.<lambda>>)[source]
SYS_RESOURCE_PATH = (<enum.auto object>, <function ENV.<lambda>>)[source]
property val[source]

Return the output of the lambda on the system’s value in the environment.