Streamlit configuration file
Streamlit configuration file
**/.streamlit/config.toml
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
**/.streamlit/config.toml and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
global | object | Global configuration options for Streamlit |
global.disableWidgetStateDuplicationWarning | boolean | By default, Streamlit displays a warning when a user sets both a widget default value in the function defining the widget and a widget value via the widget's key in st.session_state. If you'd like to turn off this warning, set this to True. default: false |
global.showWarningOnDirectExecution | boolean | If True, will show a warning when you run a Streamlit-enabled script via 'python my_script.py'. default: true |
logger | object | Configuration for Streamlit's internal logger |
logger.level | string | Level of logging for Streamlit's internal logger default: "info"one of: "error", "warning", "info", "debug" |
logger.messageFormat | string | String format for logging messages. If logger.datetimeFormat is set, logger messages will default to '%(asctime)s.%(msecs)03d %(message)s'. See Python's documentation for available attributes. default: "%(asctime)s %(message)s" |
client | object | Client-side configuration options |
client.showErrorDetails | string | Controls whether uncaught app exceptions and deprecation warnings are displayed in the browser default: "full"one of: "full", "stacktrace", "type", "none" |
client.toolbarMode | string | Change the visibility of items in the toolbar, options menu, and settings dialog (top right of the app) default: "auto"one of: "auto", "developer", "viewer", "minimal" |
client.showSidebarNavigation | boolean | Controls whether to display the default sidebar page navigation in a multi-page app. This only applies when app's pages are defined by the 'pages/' directory. default: true |
runner | object | Configuration for Streamlit's script runner |
runner.magicEnabled | boolean | Allows you to type a variable or string by itself in a single line of Python code to write it to the app. default: true |
runner.fastReruns | boolean | Handle script rerun requests immediately, rather than waiting for script execution to reach a yield point. This makes Streamlit much more responsive to user interaction, but it can lead to race conditions in apps that mutate session_state default: true |
runner.enforceSerializableSessionState | boolean | Raise an exception after adding unserializable data to Session State. Some execution environments may require serializing all data in Session State, so it may be useful to detect incompatibility during development, or when the execution default: false |
runner.enumCoercion | string | Controls how 'options' widgets (radio, selectbox, multiselect) coerce Enum members. This is particularly useful when Enum classes are redefined during script reruns. 'off' disables coercion completely, 'nameOnly' allows coercion when default: "nameOnly"one of: "off", "nameOnly", "nameAndValue" |
server | object | Server configuration options for Streamlit |
server.folderWatchList | array<string> | List of directories to watch for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify additional directories to watch. Paths must be absolute. default: [] |
server.folderWatchBlacklist | array<string> | List of directories to ignore for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify exceptions within watched directories. Paths can be absolute or relative to default: [] |
server.fileWatcherType | string | Change the type of file watcher used by Streamlit, or turn it off completely. 'auto' attempts to use watchdog module and falls back to polling, 'watchdog' forces watchdog module, 'poll' forces polling, 'none' disables file watching. default: "auto"one of: "auto", "watchdog", "poll", "none" |
server.cookieSecret | string | Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should be set to the same value across all replicas to ensure they all share the same secret. |
server.headless | boolean | If false, will attempt to open a browser window on start. Default is false unless on a Linux box where DISPLAY is unset, or running in the Streamlit Atom plugin. default: false |
server.showEmailPrompt | boolean | Whether to show a terminal prompt for the user's email address when they run Streamlit (locally) for the first time. If server.headless=True, Streamlit will not show this prompt. default: true |
server.runOnSave | boolean | Automatically rerun script when the file is modified on disk. default: false |
server.address | string | The address where the server will listen for client and browser connections. If set, the server will only be accessible from this address, and not from any aliases (like localhost). |
server.port | integer | The port where the server will listen for browser connections. default: 8501 |
server.baseUrlPath | string | The base path for the URL where Streamlit should be served from. default: "" |
server.enableCORS | boolean | Enables support for Cross-Origin Resource Sharing (CORS) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead. default: true |
server.corsAllowedOrigins | array<string> | If CORS protection is enabled, use this option to set a list of allowed origins that the Streamlit server will accept traffic from. This config option does nothing if CORS protection is disabled. default: [] |
server.enableXsrfProtection | boolean | Enables support for Cross-Site Request Forgery (XSRF) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead. default: true |
server.maxUploadSize | integer | Max size, in megabytes, for files uploaded with the file_uploader. default: 200 |
server.maxMessageSize | integer | Max size, in megabytes, of messages that can be sent via the WebSocket connection. default: 200 |
server.enableWebsocketCompression | boolean | Enables support for websocket compression. default: false |
server.enableStaticServing | boolean | Enable serving files from a 'static' directory in the running app's directory. default: false |
server.disconnectedSessionTTL | integer | TTL in seconds for sessions whose websockets have been disconnected. The server may choose to clean up session state, uploaded files, etc for a given session with no active websocket connection at any point after this time has passed. default: 120 |
server.sslCertFile | string | Server certificate file for connecting via HTTPS. Must be set at the same time as 'server.sslKeyFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production |
server.sslKeyFile | string | Cryptographic key file for connecting via HTTPS. Must be set at the same time as 'server.sslCertFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production |
browser | object | Browser configuration options for Streamlit |
browser.serverAddress | string | Address to connect to when opening browser default: "localhost" |
browser.gatherUsageStats | boolean | Whether to send usage statistics to Streamlit default: true |
browser.serverPort | integer | Port where users should point their browsers to connect to the app. This is used to set the correct URL for XSRF protection, show the URL on the terminal, and open the browser automatically. This option is for advanced use cases - to default: 8501 |
mapboxdeprecated | object | Configuration for Mapbox integration (DEPRECATED) |
mapbox.token | string | Mapbox API token for displaying maps. DEPRECATED: Use MAPBOX_API_KEY environment variable or PyDeck's api_keys argument instead. This option will be removed on or after 2026-05-01. default: "" |
theme | object | Theme configuration for Streamlit apps |
theme.base | string | The preset Streamlit theme that your custom theme inherits from. Can be either 'light' or 'dark'. one of: "light", "dark" |
theme.primaryColor | oneOf | — |
theme.backgroundColor | oneOf | — |
theme.secondaryBackgroundColor | oneOf | — |
theme.textColor | oneOf | — |
theme.linkColor | oneOf | — |
theme.linkUnderline | boolean | Whether or not links should be displayed with an underline |
theme.codeBackgroundColor | oneOf | — |
theme.font | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.fontFaces | array | An array of fonts to use in your app. Each font is a dictionary with attributes like family, url, weight, style, and unicodeRange |
theme.baseFontSize | integer | The root font size in pixels for the app. Must be a positive integer. Defaults to 16px if not set default: 16 |
theme.baseFontWeight | integer | The root font weight for the app. default: 400 |
theme.headingFont | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.headingFontSizes | oneOf | Font sizes for h1-h6 headings. Can be a single value or array of up to 6 values in pixels or rem |
theme.headingFontWeights | oneOf | Font weights for h1-h6 headings. Can be a single value or array of up to 6 values between 100 and 900 |
theme.codeFont | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.codeFontSize | oneOf | — |
theme.codeFontWeight | integer | — |
theme.baseRadius | oneOf | — |
theme.buttonRadius | oneOf | — |
theme.borderColor | oneOf | — |
theme.dataframeBorderColor | oneOf | — |
theme.dataframeHeaderBackgroundColor | oneOf | — |
theme.showWidgetBorder | boolean | Whether to show a border around input widgets |
theme.showSidebarBorder | boolean | Whether to show a vertical separator between the sidebar and the main content area |
theme.chartCategoricalColors | array | An array of colors to use for categorical chart data in Plotly, Altair, and Vega-Lite charts |
theme.chartSequentialColors | array | An array of exactly ten colors to use for sequential or continuous chart data in Plotly, Altair, and Vega-Lite charts |
theme.sidebar | object | Theme configuration specifically for the sidebar |
theme.sidebar.primaryColor | oneOf | — |
theme.sidebar.backgroundColor | oneOf | — |
theme.sidebar.secondaryBackgroundColor | oneOf | — |
theme.sidebar.textColor | oneOf | — |
theme.sidebar.linkColor | oneOf | — |
theme.sidebar.linkUnderline | boolean | Whether or not links should be displayed with an underline in the sidebar |
theme.sidebar.codeBackgroundColor | oneOf | — |
theme.sidebar.font | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.sidebar.headingFont | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.sidebar.headingFontSizes | oneOf | One or more font sizes for h1-h6 headings in the sidebar |
theme.sidebar.headingFontWeights | oneOf | One or more font weights for h1-h6 headings in the sidebar default: [700, 600, 600, 600, 600, 600] |
theme.sidebar.codeFont | oneOf | The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks |
theme.sidebar.codeFontSize | oneOf | — |
theme.sidebar.baseRadius | oneOf | — |
theme.sidebar.buttonRadius | oneOf | — |
theme.sidebar.borderColor | oneOf | — |
theme.sidebar.dataframeBorderColor | oneOf | — |
theme.sidebar.dataframeHeaderBackgroundColor | oneOf | — |
theme.sidebar.showWidgetBorder | boolean | Whether to show a border around input widgets in the sidebar |
secrets | object | Configuration for Streamlit secrets management |
secrets.files | array<string> | An entry can be a path to a TOML file or directory path where Kubernetes style secrets are saved. Order is important, import is first to last, so secrets in later files will take precedence over earlier ones. |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 97 properties, 90% carrying a description, max nesting depth 8.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$defs | JSON Schema Core, draft 2020-12 | §8.2.4 — Schema Re-Use With "$defs" |
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
maxItems | JSON Schema Validation, draft 2020-12 | §6.4.1 — "maxItems" |
maximum | JSON Schema Validation, draft 2020-12 | §6.2.2 — "maximum" |
minItems | JSON Schema Validation, draft 2020-12 | §6.4.2 — "minItems" |
minimum | JSON Schema Validation, draft 2020-12 | §6.2.4 — "minimum" |
multipleOf | JSON Schema Validation, draft 2020-12 | §6.2.1 — "multipleOf" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
pattern | JSON Schema Validation, draft 2020-12 | §6.3.3 — "pattern" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
format: "uri" | RFC 3986 (STD 66) | §3 — Syntax Components |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.