Skip to main content

config

Dealing with interactions with configuration and environment variables.

Module

Functions

_get_environment

def _get_environment()> str:

Returns bitfount environment to be used from BITFOUNT_ENVIRONMENT variable.

The result is cached to avoid multiple warning messages. This means that changes to the BITFOUNT_ENVIRONMENT environment variable will not be detected whilst the library is running.

Returns str: PRODUCTION_ENVIRONMENT, STAGING_ENVIRONMENT, DEVELOPMENT_ENVIRONMENT or SANDBOX_ENVIRONMENT

get_gpu_metadata

def get_gpu_metadata()> tuple:

Retrieve details about GPUs if available.

Uses tools available in the appropriate backend, to find GPUs that are usable by the backend.

Returns: a tuple of GPU name and count.