streamlit-nightly 1.46.2.dev20250714__py3-none-any.whl → 1.47.1.dev20250716__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. streamlit/connections/snowflake_connection.py +2 -2
  2. streamlit/elements/graphviz_chart.py +7 -0
  3. streamlit/elements/lib/file_uploader_utils.py +21 -2
  4. streamlit/elements/plotly_chart.py +6 -2
  5. streamlit/elements/pyplot.py +5 -1
  6. streamlit/elements/widgets/chat.py +6 -0
  7. streamlit/elements/widgets/file_uploader.py +6 -0
  8. streamlit/static/index.html +1 -1
  9. streamlit/static/manifest.json +218 -218
  10. streamlit/static/static/js/{ErrorOutline.esm.CaUhmcG6.js → ErrorOutline.esm.DNK5J9Fz.js} +1 -1
  11. streamlit/static/static/js/{FileDownload.esm.ZEl-HfEg.js → FileDownload.esm.Cb2Z--zt.js} +1 -1
  12. streamlit/static/static/js/{FileHelper.BKIVKQnB.js → FileHelper.QQBwcr1S.js} +1 -1
  13. streamlit/static/static/js/{FormClearHelper.C4W8xjEX.js → FormClearHelper.Fo17GZrr.js} +1 -1
  14. streamlit/static/static/js/{Hooks.Bcs7Dqad.js → Hooks.Blc9M7kn.js} +1 -1
  15. streamlit/static/static/js/{InputInstructions.CAp9mFM6.js → InputInstructions.DQ5Ej_7M.js} +1 -1
  16. streamlit/static/static/js/{ProgressBar.DBmbQ5U6.js → ProgressBar.DbvwXQwC.js} +1 -1
  17. streamlit/static/static/js/{RenderInPortalIfExists.BGENGpwt.js → RenderInPortalIfExists.DUUcjeaK.js} +1 -1
  18. streamlit/static/static/js/{Toolbar.CA92Moni.js → Toolbar.oggLWFZy.js} +1 -1
  19. streamlit/static/static/js/{base-input.C-H36mFE.js → base-input.DiS6HF4j.js} +1 -1
  20. streamlit/static/static/js/{checkbox.B6I7DbdE.js → checkbox.D60kv6TD.js} +1 -1
  21. streamlit/static/static/js/{createSuper.DEaMobJa.js → createSuper.C67qUZn1.js} +1 -1
  22. streamlit/static/static/js/{data-grid-overlay-editor.CxvB719M.js → data-grid-overlay-editor.Cov081px.js} +1 -1
  23. streamlit/static/static/js/{downloader.CDDSxxak.js → downloader.C82YfVzs.js} +1 -1
  24. streamlit/static/static/js/{es6.BMYexa9t.js → es6.BhqRltzl.js} +2 -2
  25. streamlit/static/static/js/{iframeResizer.contentWindow.D-l9cCws.js → iframeResizer.contentWindow.BZvCz8C4.js} +1 -1
  26. streamlit/static/static/js/{index.BjJqANY4.js → index.6RK7jQPW.js} +1 -1
  27. streamlit/static/static/js/{index.DygxY7Lg.js → index.B3AxymZr.js} +2 -2
  28. streamlit/static/static/js/{index.CEUhSvrW.js → index.B4lVqTBW.js} +1 -1
  29. streamlit/static/static/js/{index.Ch30W6NP.js → index.B5O7nWCz.js} +1 -1
  30. streamlit/static/static/js/{index.DJ6SMXzt.js → index.B5wDHoKR.js} +1 -1
  31. streamlit/static/static/js/{index.DBVPN8iJ.js → index.B6y7HgHo.js} +1 -1
  32. streamlit/static/static/js/{index.DFjvmFUl.js → index.BHolK_CI.js} +1 -1
  33. streamlit/static/static/js/{index.DMzpbFDn.js → index.BM85-T91.js} +1 -1
  34. streamlit/static/static/js/{index.Bb5Sxtkx.js → index.BNqR53-k.js} +1 -1
  35. streamlit/static/static/js/{index.DHv7KxuP.js → index.BOKlrlFj.js} +1 -1
  36. streamlit/static/static/js/{index.CZbA_QY0.js → index.BSlzPv51.js} +1 -1
  37. streamlit/static/static/js/{index.BdazK8za.js → index.BZF4FCAE.js} +1 -1
  38. streamlit/static/static/js/{index.1ZtAvXND.js → index.B_k2kuGW.js} +1 -1
  39. streamlit/static/static/js/{index.DNoDZbuV.js → index.By0Eif-W.js} +1 -1
  40. streamlit/static/static/js/{index.aLRZj3JI.js → index.C70-m6Fw.js} +1 -1
  41. streamlit/static/static/js/{index.Buz-cCdK.js → index.CA0u5BJL.js} +1 -1
  42. streamlit/static/static/js/{index.Br2RYgMU.js → index.C_X5F5TG.js} +1 -1
  43. streamlit/static/static/js/{index.Ce906Q5W.js → index.CaTOVCTS.js} +1 -1
  44. streamlit/static/static/js/{index.D9XZpDDt.js → index.Cb-_n28x.js} +1 -1
  45. streamlit/static/static/js/{index.Ou3kxN43.js → index.Cn9KSkdV.js} +1 -1
  46. streamlit/static/static/js/{index.B-g_Erog.js → index.CtapdFs_.js} +5 -5
  47. streamlit/static/static/js/{index.vRRu8CJW.js → index.CvFk5Vuj.js} +1 -1
  48. streamlit/static/static/js/{index.EAQB8Tuq.js → index.D1AeFlAQ.js} +3 -3
  49. streamlit/static/static/js/{index.CS9yBABI.js → index.D6Zkg3M-.js} +1 -1
  50. streamlit/static/static/js/{index.BoTBd6Jn.js → index.DFLdlD8F.js} +1 -1
  51. streamlit/static/static/js/{index.DYvo87DK.js → index.DGw6KzzW.js} +1 -1
  52. streamlit/static/static/js/{index.CphcnmQO.js → index.DJhDzJzB.js} +1 -1
  53. streamlit/static/static/js/{index.Dm8vdcs9.js → index.DbQYY96m.js} +1 -1
  54. streamlit/static/static/js/{index.phUFaJLn.js → index.KCUN3mSA.js} +1 -1
  55. streamlit/static/static/js/{index.DzH3Qe6P.js → index.KU83amIK.js} +1 -1
  56. streamlit/static/static/js/{index.Ct2v9YN2.js → index.LqU8bU6z.js} +1 -1
  57. streamlit/static/static/js/{index.BQQ5JTaz.js → index.RvGvTgvL.js} +1 -1
  58. streamlit/static/static/js/{index.kIS8fJE1.js → index.X5bDcXsg.js} +1 -1
  59. streamlit/static/static/js/{index.CqALE_Sz.js → index.dfF-LVn5.js} +1 -1
  60. streamlit/static/static/js/{index.C_f3O5DO.js → index.kt6H3rVc.js} +1 -1
  61. streamlit/static/static/js/{index.CfoE7jon.js → index.rrZNiSCJ.js} +1 -1
  62. streamlit/static/static/js/{index.C9PLrvrw.js → index.uTlWTJyJ.js} +1 -1
  63. streamlit/static/static/js/{input.DjnwsrgF.js → input.C5ChshDH.js} +1 -1
  64. streamlit/static/static/js/{memory.C-fF2BpE.js → memory.YFW_wmkS.js} +1 -1
  65. streamlit/static/static/js/{mergeWith.Cjweouij.js → mergeWith.CRLNQNLL.js} +1 -1
  66. streamlit/static/static/js/{number-overlay-editor.BFTlQD7x.js → number-overlay-editor.Coke5m2c.js} +1 -1
  67. streamlit/static/static/js/{possibleConstructorReturn.Cy1PJuxU.js → possibleConstructorReturn.DG2YBhZN.js} +1 -1
  68. streamlit/static/static/js/{sandbox.DvSXZ4R-.js → sandbox.Bk17Upg8.js} +1 -1
  69. streamlit/static/static/js/{timepicker.bPCY7gSF.js → timepicker.DGOKu1Dm.js} +1 -1
  70. streamlit/static/static/js/{toConsumableArray.DaNXH4b3.js → toConsumableArray.FS1y1Ph9.js} +1 -1
  71. streamlit/static/static/js/{uniqueId.CDZNs_pn.js → uniqueId.xlR2febd.js} +1 -1
  72. streamlit/static/static/js/{useBasicWidgetState.YAhDGDM8.js → useBasicWidgetState.WEzLnfWp.js} +1 -1
  73. streamlit/static/static/js/{useOnInputChange.HiDk3WIa.js → useOnInputChange.xCSX6R9u.js} +1 -1
  74. streamlit/static/static/js/{useTextInputAutoExpand.CwuIWHHK.js → useTextInputAutoExpand.Qpzi9U5B.js} +1 -1
  75. streamlit/static/static/js/{withFullScreenWrapper.C4lh8vGd.js → withFullScreenWrapper.BPdpC8z2.js} +1 -1
  76. streamlit/user_info.py +5 -1
  77. {streamlit_nightly-1.46.2.dev20250714.dist-info → streamlit_nightly-1.47.1.dev20250716.dist-info}/METADATA +13 -1
  78. {streamlit_nightly-1.46.2.dev20250714.dist-info → streamlit_nightly-1.47.1.dev20250716.dist-info}/RECORD +82 -82
  79. {streamlit_nightly-1.46.2.dev20250714.data → streamlit_nightly-1.47.1.dev20250716.data}/scripts/streamlit.cmd +0 -0
  80. {streamlit_nightly-1.46.2.dev20250714.dist-info → streamlit_nightly-1.47.1.dev20250716.dist-info}/WHEEL +0 -0
  81. {streamlit_nightly-1.46.2.dev20250714.dist-info → streamlit_nightly-1.47.1.dev20250716.dist-info}/entry_points.txt +0 -0
  82. {streamlit_nightly-1.46.2.dev20250714.dist-info → streamlit_nightly-1.47.1.dev20250716.dist-info}/top_level.txt +0 -0
@@ -68,10 +68,10 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
68
68
  .. |snowflake.connector.connect()| replace:: ``snowflake.connector.connect()``
69
69
  .. _snowflake.connector.connect(): https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-api#label-snowflake-connector-methods-connect
70
70
 
71
- .. Tip::
71
+ .. Important::
72
72
  `snowflake-snowpark-python <https://pypi.org/project/snowflake-snowpark-python/>`_
73
73
  must be installed in your environment to use this connection. You can
74
- install Snowflake extras along with Streamlit:
74
+ install it as an extra with Streamlit:
75
75
 
76
76
  >>> pip install streamlit[snowflake]
77
77
 
@@ -45,6 +45,13 @@ class GraphvizMixin:
45
45
  ) -> DeltaGenerator:
46
46
  """Display a graph using the dagre-d3 library.
47
47
 
48
+ .. Important::
49
+ You must install ``graphviz>=0.19.0`` to use this command. You can
50
+ install all charting dependencies (except Bokeh) as an extra with
51
+ Streamlit:
52
+
53
+ >>> pip install streamlit[charts]
54
+
48
55
  Parameters
49
56
  ----------
50
57
  figure_or_dot : graphviz.dot.Graph, graphviz.dot.Digraph, graphviz.sources.Source, str
@@ -31,6 +31,18 @@ TYPE_PAIRS = [
31
31
  ]
32
32
 
33
33
 
34
+ def _get_main_filename_and_extension(filename: str) -> tuple[str, str]:
35
+ """Returns the main part of a filename and its extension."""
36
+ # Handle NTFS Alternate Data Streams (ADS) on Windows, e.g: "file.txt:ads" -> ("file.txt", ".txt")
37
+ if os.name == "nt" and ":" in filename:
38
+ main_filename, ads_part = filename.split(":", 1)
39
+ # We only treat it as an ADS if the part after the colon has an extension.
40
+ if os.path.splitext(ads_part)[1]:
41
+ return main_filename, os.path.splitext(main_filename)[1]
42
+
43
+ return filename, os.path.splitext(filename)[1]
44
+
45
+
34
46
  def normalize_upload_file_type(file_type: str | Sequence[str]) -> Sequence[str]:
35
47
  if isinstance(file_type, str):
36
48
  file_type = [file_type]
@@ -59,8 +71,15 @@ def enforce_filename_restriction(filename: str, allowed_types: Sequence[str]) ->
59
71
  enforce file type check by extension on the frontend, but we check it on backend
60
72
  before returning file to the user to protect ourselves.
61
73
  """
62
- normalized_filename = filename.lower()
63
- base_name, extension = os.path.splitext(normalized_filename)
74
+
75
+ # Ensure that there isn't a null byte in a filename
76
+ # since this could be a workaround to bypass the file type check.
77
+ if "\0" in filename:
78
+ raise StreamlitAPIException("Filename cannot contain null bytes.")
79
+
80
+ main_filename, extension = _get_main_filename_and_extension(filename)
81
+ normalized_filename = main_filename.lower()
82
+
64
83
  normalized_allowed_types = [allowed_type.lower() for allowed_type in allowed_types]
65
84
 
66
85
  if not any(
@@ -328,8 +328,12 @@ class PlotlyMixin:
328
328
  you would call Plotly's ``py.plot`` or ``py.iplot``.
329
329
 
330
330
  .. Important::
331
- You must install ``plotly`` to use this command. Your app's
332
- performance may be enhanced by installing ``orjson`` as well.
331
+ You must install ``plotly>=4.0.0`` to use this command. Your app's
332
+ performance may be enhanced by installing ``orjson`` as well. You
333
+ can install all charting dependencies (except Bokeh) as an extra
334
+ with Streamlit:
335
+
336
+ >>> pip install streamlit[charts]
333
337
 
334
338
  Parameters
335
339
  ----------
@@ -42,7 +42,11 @@ class PyplotMixin:
42
42
  """Display a matplotlib.pyplot figure.
43
43
 
44
44
  .. Important::
45
- You must install ``matplotlib`` to use this command.
45
+ You must install ``matplotlib>=3.0.0`` to use this command. You can
46
+ install all charting dependencies (except Bokeh) as an extra with
47
+ Streamlit:
48
+
49
+ >>> pip install streamlit[charts]
46
50
 
47
51
  Parameters
48
52
  ----------
@@ -465,6 +465,12 @@ class ChatMixin:
465
465
  example, to only accept JPG/JPEG and PNG files, use
466
466
  ``["jpg", "jpeg", "png"]``.
467
467
 
468
+ .. note::
469
+ This is a best-effort check, but doesn't provide a
470
+ security guarantee against users uploading files of other types
471
+ or type extensions. The correct handling of uploaded files is
472
+ part of the app developer's responsibility.
473
+
468
474
  disabled : bool
469
475
  Whether the chat input should be disabled. This defaults to
470
476
  ``False``.
@@ -296,6 +296,12 @@ class FileUploaderMixin:
296
296
  example, to only accept JPG/JPEG and PNG files, use
297
297
  ``["jpg", "jpeg", "png"]``.
298
298
 
299
+ .. note::
300
+ This is a best-effort check, but doesn't provide a
301
+ security guarantee against users uploading files of other types
302
+ or type extensions. The correct handling of uploaded files is
303
+ part of the app developer's responsibility.
304
+
299
305
  accept_multiple_files : bool
300
306
  Whether to accept more than one file in a submission. If this is
301
307
  ``False`` (default), the user can only submit one file at a time.
@@ -37,7 +37,7 @@
37
37
  <script>
38
38
  window.prerenderReady = false
39
39
  </script>
40
- <script type="module" crossorigin src="./static/js/index.EAQB8Tuq.js"></script>
40
+ <script type="module" crossorigin src="./static/js/index.D1AeFlAQ.js"></script>
41
41
  <link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
42
42
  </head>
43
43
  <body>