settings
settings.py — read config values by path. Backed by the
setting_node database table (a tree: folders contain settings or other
folders) and browsable through the Settings dashboard page. Imported as
settings from quantstrip.
Reading a value
get_by_path(path)
The parsed, decrypted value at path. For an environment-backed node
(_source: env), transparently returns the live OS value instead — a caller
never needs to know which storage mode a given setting uses.
None if the path doesn't exist (or,
for an env-backed setting, if the environment variable isn't set).from quantstrip import settings
allocation = settings.get_by_path(
"Settings/Strategy Settings/"
"Monthly Flow Rebalancing/allocation"
)
Introspection
Occasionally useful from a client that wants to check its own configuration rather than just read a value blindly.
get_raw_by_path(path)
The raw node — no parsing or decryption — for inspecting node_type/
value_type/source/env_var directly. Returns a
dict, or None.
get_setting_type(path)
The value_type metadata (text/float/bool/
list/dict/secret). Returns str, or
None.
get_setting_source(path)
Whether a setting is stored directly or resolved from the environment. Returns
"direct" or "env", or None.
get_env_var_status(path)
Whether an environment-backed setting's variable is actually set on the host. Returns
True/False, or None if path isn't an
environment-backed setting.
get_env_var(name)
Module-level helper in settings.py, not a Settings method —
reads directly from the Windows registry (system hive, then user hive), so a value set on
the host is picked up without restarting the Quantstrip service. get_by_path
already calls this for you on an environment-backed setting.
from settings import get_env_var
value = get_env_var("IBKR_OAUTH_PAPER_ACCESS_TOKEN")