qmd_py.config¶
Application settings, loaded from MARQ_* environment variables or a
.env file — see Configuration for the
user-facing reference.
config ¶
Application settings, loaded from environment / .env.
qmd-py lives in its own qmd_py Postgres schema inside the same qmd
database the TS/Postgres reference implementation uses (not a separate
database - see the project plan's "Single Postgres, forever" decision).
Isolation from the TS tables (which live in public) comes from the
search_path connection option below, not from a different database.
Settings ¶
Bases: BaseSettings
Application settings, read from MARQ_* env vars or a .env file.
Constructing this raises pydantic.ValidationError when a required
setting is missing - cli/main.py catches that at the outermost
level and turns it into a short message rather than a traceback.
postgres_url
instance-attribute
¶
postgresql+psycopg://user:pass@host/db - no search_path needed here,
it's appended automatically in sqlalchemy_url.
llm_base_url
class-attribute
instance-attribute
¶
A localhost placeholder, not a real router. Deliberately not a
required setting: the LLM is only needed by
query/vsearch/embed/doctor, and making it required would stop
status/ls/get/search working for someone with no router at
all. Pointing at localhost means an unconfigured install fails with
an obvious connection-refused on its own machine, rather than a
confusing timeout against a host that only exists on this project
author's network - see llm-stack/README.md to run one locally.
default_user_email
class-attribute
instance-attribute
¶
Identifies the single mocked user (see auth.py). Created on first use.
log_level
class-attribute
instance-attribute
¶
DEBUG/INFO/WARNING/ERROR/CRITICAL. The default is silent on a
healthy run - a non-empty log means something actually degraded (see
log.py). INFO is the sensible level for a long-running MCP daemon;
the CLI's -v/-vv flags override this per invocation.
log_file
class-attribute
instance-attribute
¶
Log to this size-rotated file instead of stderr. Unset means stderr, which is what the CLI and the stdio MCP transport want - never stdout, which carries parseable output and JSON-RPC respectively.
sqlalchemy_url
property
¶
postgres_url with the schema pinned via a libpq options
parameter.
Returns:
-
str–The DSN with
search_pathappended, joined with?or& -
str–depending on whether the configured URL already carries a
-
str–query string.
get_settings
cached
¶
Lazily constructed so importing this module doesn't require MARQ_POSTGRES_URL to already be set (e.g. during test collection).