fhirpack.config module#

class fhirpack.config.Config[source]#

Bases: object

Used to manage the configuration of the package.

property data#
get(key)[source]#
getLogger(name: str)[source]#

Returns a logger instance.

Parameters:

name (str) – Name of the logger.

Returns:

Logger.

Return type:

logging.Logger

globalExceptionHandler(exctype, value, tb)[source]#
loadConfig(dotenvPath: str | None = None)[source]#

Loads a FHIRPACK configuration from the given .env file.

Parameters:

dotenvPath (Union[str, None]) – Path to the .env file. Defaults to None.

set(key: str, value: str, saveToEnv: bool = False)[source]#

Set a configuration variable.

Parameters:
  • key (str) – Key of the configuration variable.

  • value (str) – Value of the configuration variable.

  • saveToEnv (Union[bool, None]) – Whether to save the configuration variable to the .env file. Defaults to False.

Returns:

Value of the configuration variable.

Return type:

str