API Environment Contract
core check-config validates runtime configuration; core config template/drift-check standardize profiles.
Settings schema (high level)
app: name/version/env/debugapi: prefix, error status modesecurity: jwt secret, cors, trusted hosts, max request sizedatabase: url/read_url/pool settings/tenant fallbackobservability: service role and metricstask_queue: provider, attempts, backoffscheduler: provider and lock settingstenant_lifecycle: tenant state controlsdependencies: redis/object storage/oidc URLsinstalled_apps: list of module paths
Env parsing uses nested delimiter with __ (example: APP__ENV).
Profiles and recommended values
local:core config template --profile local --jsonprivate:core config template --profile private --jsoncloud:core config template --profile cloud --json
core config drift-check --profile <profile> --json compares actual env to profile and returns:
has_drift: booleanchecked: key listmissing: missing required entriesmismatched: values that do not match expectation
Environment variable quick map
Examples used by templates:
APP__ENV(local/private/cloud)DATABASE__URLAPI__ERROR_HTTP_STATUS_MODE: usuallystandardSECURITY__JWT_SECRET(local dev) orSECURITY__JWT_SECRET_REF(private/cloud)SECURITY__TRUSTED_HOSTSSECURITY__CORS_ORIGINSTASK_QUEUE__PROVIDER(sync|database)SCHEDULER__PROVIDER(local|apscheduler|celery_beat)OBSERVABILITY__SERVICE_ROLEINSTALLED_APPS(JSON array string)
Response format
Most JSON mode CLI responses use:
ok: boolcommand: command path (string)error: error object for failure modes- command-specific payload fields (drift/app checks/results)
Use --json for all operations used in scripts and CI.