@@ -133,11 +133,11 @@ showSidebarNavigation = true
133
133
# Default: true
134
134
magicEnabled = true
135
135
136
- # Handle script rerun requests immediately, rather than waiting for script
137
- # execution to reach a yield point. This makes Streamlit much more
138
- # responsive to user interaction, but it can lead to race conditions in
139
- # apps that mutate session_state data outside of explicit session_state
140
- # assignment statements.
136
+ # Handle script rerun requests immediately, rather than waiting for
137
+ # script execution to reach a yield point.
138
+ # This makes Streamlit much more responsive to user interaction, but it
139
+ # can lead to race conditions in apps that mutate session_state data
140
+ # outside of explicit session_state assignment statements.
141
141
# Default: true
142
142
fastReruns = true
143
143
@@ -149,8 +149,9 @@ fastReruns = true
149
149
enforceSerializableSessionState = false
150
150
151
151
# Adjust how certain 'options' widgets like radio, selectbox, and
152
- # multiselect coerce Enum members when the Enum class gets re-defined
153
- # during a script re-run. For more information, check out the docs:
152
+ # multiselect coerce Enum members.
153
+ # This is useful when the Enum class gets re-defined during a script
154
+ # re-run. For more information, check out the docs:
154
155
# https://docs.streamlit.io/develop/concepts/design/custom-classes#enums
155
156
# Allowed values:
156
157
# - "off" : Disables Enum coercion.
@@ -166,8 +167,18 @@ enumCoercion = "nameOnly"
166
167
``` toml
167
168
[server ]
168
169
169
- # List of folders that should not be watched for changes.
170
- # Relative paths will be taken as relative to the current working directory.
170
+ # List of directories to watch for changes.
171
+ # By default, Streamlit watches files in the current working directory
172
+ # and its subdirectories. Use this option to specify additional
173
+ # directories to watch. Paths must be absolute.
174
+ # Default: []
175
+ folderWatchList = []
176
+
177
+ # List of directories to ignore for changes.
178
+ # By default, Streamlit watches files in the current working directory
179
+ # and its subdirectories. Use this option to specify exceptions within
180
+ # watched directories. Paths can be absolute or relative to the current
181
+ # working directory.
171
182
# Example: ['/home/user1/env', 'relative/path/to/folder']
172
183
# Default: []
173
184
folderWatchBlacklist = []
@@ -199,14 +210,14 @@ headless = false
199
210
runOnSave = false
200
211
201
212
# The address where the server will listen for client and browser
202
- # connections. Use this if you want to bind the server to a specific address.
213
+ # connections.
214
+ # Use this if you want to bind the server to a specific address.
203
215
# If set, the server will only be accessible from this address, and not from
204
216
# any aliases (like localhost).
205
217
# Default: (unset)
206
218
address =
207
219
208
220
# The port where the server will listen for browser connections.
209
- # Don't use port 3000 which is reserved for internal development.
210
221
# Default: 8501
211
222
port = 8501
212
223
@@ -221,6 +232,15 @@ baseUrlPath = ""
221
232
# Default: true
222
233
enableCORS = true
223
234
235
+ # Allowed list of origins.
236
+ # If CORS protection is enabled (`server.enableCORS=True`), use this
237
+ # option to set a list of allowed origins that the Streamlit server will
238
+ # accept traffic from.
239
+ # This config option does nothing if CORS protection is disabled.
240
+ # Example: ['http://example.com', 'https://streamlit.io']
241
+ # Default: []
242
+ corsAllowedOrigins = []
243
+
224
244
# Enables support for Cross-Site Request Forgery (XSRF) protection, for
225
245
# added security.
226
246
# If XSRF protection is enabled and CORS protection is disabled at the
@@ -246,9 +266,10 @@ enableWebsocketCompression = false
246
266
# Default: false
247
267
enableStaticServing = false
248
268
249
- # TTL in seconds for sessions whose websockets have been disconnected. The server
250
- # may choose to clean up session state, uploaded files, etc for a given session
251
- # with no active websocket connection at any point after this time has passed.
269
+ # TTL in seconds for sessions whose websockets have been disconnected.
270
+ # The server may choose to clean up session state, uploaded files, etc
271
+ # for a given session with no active websocket connection at any point
272
+ # after this time has passed.
252
273
# Default: 120
253
274
disconnectedSessionTTL = 120
254
275
@@ -294,8 +315,7 @@ gatherUsageStats = true
294
315
# - Show the URL on the terminal (part of `streamlit run`).
295
316
# - Open the browser automatically (part of `streamlit run`).
296
317
# This option is for advanced use cases. To change the port of your app, use
297
- # `server.Port` instead. Don't use port 3000 which is reserved for internal
298
- # development.
318
+ # `server.Port` instead.
299
319
# Default: whatever value is set in server.port.
300
320
serverPort = 8501
301
321
```
@@ -305,10 +325,12 @@ serverPort = 8501
305
325
``` toml
306
326
[mapbox ]
307
327
308
- # Configure Streamlit to use a custom Mapbox
309
- # token for elements like st.pydeck_chart and st.map.
310
- # To get a token for yourself, create an account at
311
- # https://mapbox.com. It's free (for moderate usage levels)!
328
+ # If you'd like to show maps using Mapbox rather than Carto, use this
329
+ # to pass the Mapbox API token.
330
+ # THIS IS DEPRECATED.
331
+ # Instead of this, you should use either the MAPBOX_API_KEY environment
332
+ variable or PyDeck's `api_keys` argument.
333
+ # This option will be removed on or after 2026-05-01.
312
334
# Default: ""
313
335
token = " "
314
336
```
@@ -340,67 +362,105 @@ linkColor =
340
362
# Background color used for code blocks.
341
363
codeBackgroundColor =
342
364
343
- # The font family for all text, except code blocks. This can be one of
344
- # the following:
365
+ # The font family for all text, except code blocks.
366
+ # This can be one of the following:
345
367
# - "sans-serif"
346
368
# - "serif"
347
369
# - "monospace"
348
- # - the `family` value for a custom font table under [[theme.fontFaces]]
349
- # - a comma-separated list of these (as a single string) to specify
370
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
371
+ # - A comma-separated list of these (as a single string) to specify
350
372
# fallbacks
351
373
# For example, you can use the following:
352
374
# font = "cool-font, fallback-cool-font, sans-serif"
353
375
font =
354
376
355
- # The font family to use for code (monospace) in the sidebar. This can be
356
- # one of the following:
377
+ # The font family to use for code (monospace) in the sidebar.
378
+ # This can be one of the following:
357
379
# - "sans-serif"
358
380
# - "serif"
359
381
# - "monospace"
360
- # - the `family` value for a custom font table under [[theme.fontFaces]]
361
- # - a comma-separated list of these (as a single string) to specify
382
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
383
+ # - A comma-separated list of these (as a single string) to specify
362
384
# fallbacks
363
385
codeFont =
364
386
365
- # The font family to use for headings. This can be one of the following:
387
+ # Sets the font size (in pixels or rem) for code blocks and code text.
388
+ # This applies to `st.code`, `st.json`, and `st.help`.
389
+ # It does not apply to inline code, which is set by default to 0.75em.
390
+ # When unset, the code font size will be 0.875rem.
391
+ codeFontSize =
392
+
393
+ # The font family to use for headings.
394
+ # This can be one of the following:
366
395
# - "sans-serif"
367
396
# - "serif"
368
397
# - "monospace"
369
- # - the `family` value for a custom font table under [[theme.fontFaces]]
370
- # - a comma-separated list of these (as a single string) to specify
398
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
399
+ # - A comma-separated list of these (as a single string) to specify
371
400
# fallbacks
372
401
# If no heading font is set, Streamlit uses `theme.font` for headings.
373
402
headingFont =
374
403
375
- # An array of fonts to use in your app. Each font in the array is a table
376
- # (dictionary) with the following three attributes: family, url, weight,
377
- # and style. To host a font with your app, enable static file serving
378
- # with `server.enableStaticServing=true`. You can define multiple
379
- # [[theme.fontFaces]] tables.
380
- # For example, each font is defined in a [[theme.fontFaces]] table as
381
- # follows:
404
+ # An array of fonts to use in your app.
405
+ # Each font in the array is a table (dictionary) that can have the
406
+ # following attributes, closely resembling CSS font-face definitions:
407
+ # - family
408
+ # - url
409
+ # - weight (optional)
410
+ # - style (optional)
411
+ # - unicodeRange (optional)
412
+ # To host a font with your app, enable static file serving with
413
+ # `server.enableStaticServing=true`.
414
+ # You can define multiple [[theme.fontFaces]] tables, including multiple
415
+ # tables with the same family if your font is defined by multiple files.
416
+ # For example, a font hosted with your app may have a [[theme.fontFaces]]
417
+ # table as follows:
382
418
# [[theme.fontFaces]]
383
419
# family = "font_name"
384
420
# url = "app/static/font_file.woff"
385
- # weight = 400
421
+ # weight = " 400"
386
422
# style = "normal"
387
423
fontFaces =
388
424
389
- # The radius used as basis for the corners of most UI elements. This can
390
- # be one of the following: "none", "small", "medium", "large", "full",
391
- # or the number in pixels or rem. For example, you can use "10px",
392
- # "0.5rem", or "2rem". To follow best practices, use rem instead of
393
- # pixels when specifying a numeric size.
425
+ # The radius used as basis for the corners of most UI elements.
426
+ # This can be one of the following:
427
+ # - "none"
428
+ # - "small"
429
+ # - "medium"
430
+ # - "large"
431
+ # - "full"
432
+ # - The number in pixels or rem.
433
+ # For example, you can use "10px", "0.5rem", or "2rem". To follow best
434
+ # practices, use rem instead of pixels when specifying a numeric size.
394
435
baseRadius =
395
436
437
+ # The radius used as basis for the corners of buttons.
438
+ # This can be one of the following:
439
+ # - "none"
440
+ # - "small"
441
+ # - "medium"
442
+ # - "large"
443
+ # - "full"
444
+ # - The number in pixels or rem.
445
+ # For example, you can use "10px", "0.5rem", or "2rem". To follow best
446
+ # practices, use rem instead of pixels when specifying a numeric size.
447
+ # If no button radius is set, Streamlit uses `theme.baseRadius` instead.
448
+ buttonRadius =
449
+
396
450
# The color of the border around elements.
397
451
borderColor =
398
452
453
+ # The color of the border around dataframes and tables.
454
+ # If no dataframe border color is set, Streamlit uses `theme.borderColor`
455
+ # instead.
456
+ dataframeBorderColor =
457
+
399
458
# Whether to show a border around input widgets.
400
459
showWidgetBorder =
401
460
402
- # Sets the root font size (in pixels) for the app, which determines the
403
- # overall scale of text and UI elements. The default base font size is 16.
461
+ # Sets the root font size (in pixels) for the app.
462
+ # This determines the overall scale of text and UI elements.
463
+ # When unset, the font size will be 16px.
404
464
baseFontSize =
405
465
406
466
# Whether to show a vertical separator between the sidebar and the main
@@ -431,48 +491,78 @@ linkColor =
431
491
# Background color used for code blocks.
432
492
codeBackgroundColor =
433
493
434
- # The font family for all text, except code blocks. This can be one of
435
- # the following:
494
+ # The font family for all text, except code blocks.
495
+ # This can be one of the following:
436
496
# - "sans-serif"
437
497
# - "serif"
438
498
# - "monospace"
439
- # - the `family` value for a custom font table under [[theme.fontFaces]]
440
- # - a comma-separated list of these (as a single string) to specify
499
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
500
+ # - A comma-separated list of these (as a single string) to specify
441
501
# fallbacks
442
502
# For example, you can use the following:
443
503
# font = "cool-font, fallback-cool-font, sans-serif"
444
504
font =
445
505
446
- # The font family to use for code (monospace) in the sidebar. This can be
447
- # one of the following:
506
+ # The font family to use for code (monospace) in the sidebar.
507
+ # This can be one of the following:
448
508
# - "sans-serif"
449
509
# - "serif"
450
510
# - "monospace"
451
- # - the `family` value for a custom font table under [[theme.fontFaces]]
452
- # - a comma-separated list of these (as a single string) to specify
511
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
512
+ # - A comma-separated list of these (as a single string) to specify
453
513
# fallbacks
454
514
codeFont =
455
515
456
- # The font family to use for headings. This can be one of the following:
516
+ # Sets the font size (in pixels or rem) for code blocks and code text.
517
+ # This applies to `st.code`, `st.json`, and `st.help`.
518
+ # It does not apply to inline code, which is set by default to 0.75em.
519
+ # When unset, the code font size will be 0.875rem.
520
+ codeFontSize =
521
+
522
+ # The font family to use for headings.
523
+ # This can be one of the following:
457
524
# - "sans-serif"
458
525
# - "serif"
459
526
# - "monospace"
460
- # - the `family` value for a custom font table under [[theme.fontFaces]]
461
- # - a comma-separated list of these (as a single string) to specify
527
+ # - The `family` value for a custom font table under [[theme.fontFaces]]
528
+ # - A comma-separated list of these (as a single string) to specify
462
529
# fallbacks
463
530
# If no heading font is set, Streamlit uses `theme.font` for headings.
464
531
headingFont =
465
532
466
- # The radius used as basis for the corners of most UI elements. This can
467
- # be one of the following: "none", "small", "medium", "large", "full",
468
- # or the number in pixels or rem. For example, you can use "10px",
469
- # "0.5rem", or "2rem". To follow best practices, use rem instead of
470
- # pixels when specifying a numeric size.
533
+ # The radius used as basis for the corners of most UI elements.
534
+ # This can be one of the following:
535
+ # - "none"
536
+ # - "small"
537
+ # - "medium"
538
+ # - "large"
539
+ # - "full"
540
+ # - The number in pixels or rem.
541
+ # For example, you can use "10px", "0.5rem", or "2rem". To follow best
542
+ # practices, use rem instead of pixels when specifying a numeric size.
471
543
baseRadius =
472
544
545
+ # The radius used as basis for the corners of buttons.
546
+ # This can be one of the following:
547
+ # - "none"
548
+ # - "small"
549
+ # - "medium"
550
+ # - "large"
551
+ # - "full"
552
+ # - The number in pixels or rem.
553
+ # For example, you can use "10px", "0.5rem", or "2rem". To follow best
554
+ # practices, use rem instead of pixels when specifying a numeric size.
555
+ # If no button radius is set, Streamlit uses `theme.baseRadius` instead.
556
+ buttonRadius =
557
+
473
558
# The color of the border around elements.
474
559
borderColor =
475
560
561
+ # The color of the border around dataframes and tables.
562
+ # If no dataframe border color is set, Streamlit uses `theme.borderColor`
563
+ # instead.
564
+ dataframeBorderColor =
565
+
476
566
# Whether to show a border around input widgets.
477
567
showWidgetBorder =
478
568
```
@@ -482,10 +572,11 @@ showWidgetBorder =
482
572
``` toml
483
573
[secrets ]
484
574
485
- # List of locations where secrets are searched. An entry can be a path to a
486
- # TOML file or directory path where Kubernetes style secrets are saved.
487
- # Order is important, import is first to last, so secrets in later files
488
- # will take precedence over earlier ones.
575
+ # List of locations where secrets are searched.
576
+ # An entry can be a path to a TOML file or directory path where
577
+ # Kubernetes style secrets are saved. Order is important, import is
578
+ # first to last, so secrets in later files will take precedence over
579
+ # earlier ones.
489
580
# Default: [ <path to local environment's secrets.toml file>, <path to project's secrets.toml file>,]
490
581
files = [ " ~/.streamlit/secrets.toml" , " ~/project directory/.streamlit/secrets.toml" ,]
491
582
```
0 commit comments