Environment¶
The GPPEnvironment enum defines the
available GPP environments.
These environments correspond to distinct GPP deployments, each with its own:
Base URL
Token
Configuration entry
Available Values¶
from gpp_client.config.environment import GPPEnvironment
print(list(GPPEnvironment))
The enum contains:
DEVELOPMENTSTAGINGPRODUCTION
Usage¶
The enum is used throughout the configuration system:
from gpp_client.config import GPPConfig, GPPEnvironment
config = GPPConfig()
config.activate(GPPEnvironment.STAGING)
String values are automatically normalized:
config.activate("development") # valid
config.activate("DEVELOPMENT") # valid
Relationship to Defaults¶
Each environment has a default URL defined in Defaults.
The environment selected in the config file determines which token is used by default.