SteelWorks reads its runtime configuration from environment variables, loading them automatically from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/kishnahai0806/SteelWorks/llms.txt
Use this file to discover all available pages before exploring further.
.env file at startup via python-dotenv. No application code needs to change between environments — you simply swap the .env file or set variables directly in your hosting platform. The same mechanism applies to tests, which read from a separate .env.test file so test credentials never bleed into the running application.
Environment files
SteelWorks uses two distinct environment files to keep application and test configuration separate:| File | Used by | Notes |
|---|---|---|
.env | The running Streamlit app | Loaded at startup by _resolve_database_url() in streamlit_app.py. Override with platform env vars (e.g., Render). |
.env.test | Integration and end-to-end tests | Read by the test suite. Keeps test database credentials isolated from the app. |
Environment variables
The PostgreSQL connection string used by the running application.Must use the If this variable is absent or empty, the dashboard will not start and will display an error instructing you to add it to
postgresql+pg8000:// driver scheme so SQLAlchemy selects the correct pure-Python pg8000 driver. See URL normalization below for the forms SteelWorks will automatically convert..env. During development you may omit it entirely to use the built-in fallback data — but the error message is shown in that case; see the Quickstart for details on the offline mode.The Sentry Data Source Name (DSN) used to initialise error monitoring.When present and non-empty, SteelWorks calls When configuring this value in the Render dashboard, enter the DSN unquoted — do not wrap it in single or double quotes.
sentry_sdk.init() with send_default_pii=False and traces_sample_rate=0.0. Leave this variable blank or omit it entirely to run without any Sentry overhead.The PostgreSQL connection string used exclusively by the integration and end-to-end test suite. Defined in When the URL resolves to
.env.test, not in .env.Default local value:127.0.0.1:5433/testdb, the test suite automatically starts a local Docker Postgres container (postgres:18) at that address if one is not already running, then resets the schema and seeds test data before executing tests. This means you do not need to manage a test database manually.The alternative key DATABASE_URL_TEST is also accepted for compatibility.Controls the verbosity of application logging. Accepts any standard Python log level name.Default: Accepted values (case-insensitive):
INFODEBUG, INFO, WARNING, ERROR, CRITICAL. See Logging below for details on how this variable is applied.URL normalization
OperationsRepository normalizes incoming DATABASE_URL values before passing them to SQLAlchemy. This means you can paste a URL directly from Render or another provider without manually editing the scheme:
postgresql+pg8000:// is left unchanged. Using the explicit form in your .env file is still recommended to make the driver choice visible at a glance.
Logging
SteelWorks configures application-wide logging through theconfigure_logging() function in app/logging_config.py. This function is called once at the start of main() before any Streamlit components are rendered.
The log level is read from the APP_LOG_LEVEL environment variable (default: INFO) and applied to the root logger. The log format is:
configure_logging() checks whether handlers are already attached to the root logger before calling logging.basicConfig(). If handlers are present it only updates the log level, avoiding duplicate log entries.
To increase verbosity during development, add the following to your .env file: