Skip to content

HostEnvironment

Provide information about the hosting environment an application is running in.

content_root_path property

content_root_path: str

Absolute path to the directory that contains the application content files.

environment_name property

environment_name: str

Environment name.

is_development

is_development() -> bool

Check if the current host environment name is development.

is_environment

is_environment(environment_name: str) -> bool

Compare the current host environment name against the specified value.

is_local

is_local() -> bool

Check if the current host environment name is local.

is_production

is_production() -> bool

Check if the current host environment name is production.

is_staging

is_staging() -> bool

Check if the current host environment name is staging.