Config
config
¶
Handling the configuration for all adapters
DEFAULT_CFG = f'# Configuration for Ultimate Notion## * Non-absolute paths are always relative to the directory of this file.# * You can use environment variables in the format ${env:VAR_NAME} or ${env:VAR_NAME|DEFAULT_VALUE}.[ultimate_notion]sync_state_dir = "sync_states"token = "${env:{ENV_NOTION_TOKEN}}"[google]client_secret_json = "client_secret.json"token_json = "token.json"'
module-attribute
¶
DEFAULT_ULTIMATE_NOTION_CFG_PATH: str = '.ultimate-notion/config.toml'
module-attribute
¶
Default path within $HOME to the configuration file of Ultimate Notion
ENV_NOTION_TOKEN = 'NOTION_TOKEN'
module-attribute
¶
Name of the environment variable to look up the Notion token
ENV_ULTIMATE_NOTION_CFG: str = 'ULTIMATE_NOTION_CONFIG'
module-attribute
¶
Name of the environment variable to look up the path for the config
Config
¶
Main configuration object.
GoogleCfg
¶
UNOCfg
¶
get_cfg() -> Config
¶
Returns the configuration as an object.
get_cfg_file() -> Path
¶
Determines the path of the config file.
get_or_create_cfg() -> Config
¶
Returns the configuration as an object or creates it if it doesn't exist yet.
resolve_env_value(value: str) -> str
¶
Resolves environment variable values in the format ${env:VAR_NAME|DEFAULT_VALUE}.