streamlit 1.51.0__py3-none-any.whl → 1.52.1__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 (314) hide show
  1. streamlit/__init__.py +1 -0
  2. streamlit/commands/execution_control.py +89 -14
  3. streamlit/components/v1/component_arrow.py +7 -7
  4. streamlit/components/v2/__init__.py +59 -3
  5. streamlit/components/v2/bidi_component/main.py +161 -13
  6. streamlit/components/v2/bidi_component/serialization.py +13 -6
  7. streamlit/components/v2/component_manager.py +11 -3
  8. streamlit/components/v2/component_registry.py +18 -1
  9. streamlit/components/v2/types.py +2 -2
  10. streamlit/connections/snowflake_connection.py +1 -1
  11. streamlit/connections/snowpark_connection.py +1 -1
  12. streamlit/dataframe_util.py +18 -18
  13. streamlit/delta_generator.py +7 -0
  14. streamlit/delta_generator_singletons.py +8 -14
  15. streamlit/elements/alert.py +16 -0
  16. streamlit/elements/arrow.py +36 -6
  17. streamlit/elements/bokeh_chart.py +10 -78
  18. streamlit/elements/code.py +2 -2
  19. streamlit/elements/deck_gl_json_chart.py +1 -1
  20. streamlit/elements/exception.py +1 -1
  21. streamlit/elements/form.py +27 -0
  22. streamlit/elements/heading.py +60 -5
  23. streamlit/elements/html.py +13 -2
  24. streamlit/elements/image.py +1 -1
  25. streamlit/elements/layouts.py +28 -22
  26. streamlit/elements/lib/built_in_chart_utils.py +49 -16
  27. streamlit/elements/lib/color_util.py +1 -1
  28. streamlit/elements/lib/column_config_utils.py +6 -5
  29. streamlit/elements/lib/layout_utils.py +50 -0
  30. streamlit/elements/lib/pandas_styler_utils.py +17 -9
  31. streamlit/elements/lib/shortcut_utils.py +152 -0
  32. streamlit/elements/markdown.py +50 -3
  33. streamlit/elements/metric.py +31 -1
  34. streamlit/elements/plotly_chart.py +75 -6
  35. streamlit/elements/spinner.py +1 -1
  36. streamlit/elements/text.py +20 -3
  37. streamlit/elements/toast.py +2 -0
  38. streamlit/elements/vega_charts.py +17 -1
  39. streamlit/elements/widgets/audio_input.py +8 -7
  40. streamlit/elements/widgets/button.py +279 -40
  41. streamlit/elements/widgets/button_group.py +27 -2
  42. streamlit/elements/widgets/camera_input.py +1 -1
  43. streamlit/elements/widgets/chat.py +300 -42
  44. streamlit/elements/widgets/color_picker.py +7 -0
  45. streamlit/elements/widgets/data_editor.py +68 -28
  46. streamlit/elements/widgets/file_uploader.py +4 -1
  47. streamlit/elements/widgets/number_input.py +2 -0
  48. streamlit/elements/widgets/text_widgets.py +2 -0
  49. streamlit/elements/widgets/time_widgets.py +581 -9
  50. streamlit/errors.py +22 -0
  51. streamlit/git_util.py +1 -1
  52. streamlit/navigation/page.py +7 -0
  53. streamlit/net_util.py +2 -2
  54. streamlit/proto/Alert_pb2.pyi +3 -3
  55. streamlit/proto/AppPage_pb2.pyi +7 -1
  56. streamlit/proto/ArrowData_pb2.pyi +7 -1
  57. streamlit/proto/ArrowNamedDataSet_pb2.pyi +7 -1
  58. streamlit/proto/ArrowVegaLiteChart_pb2.pyi +7 -1
  59. streamlit/proto/Arrow_pb2.py +10 -10
  60. streamlit/proto/Arrow_pb2.pyi +19 -12
  61. streamlit/proto/AudioInput_pb2.pyi +7 -1
  62. streamlit/proto/Audio_pb2.pyi +7 -1
  63. streamlit/proto/AuthRedirect_pb2.pyi +7 -1
  64. streamlit/proto/AutoRerun_pb2.pyi +7 -1
  65. streamlit/proto/BackMsg_pb2.py +4 -2
  66. streamlit/proto/BackMsg_pb2.pyi +34 -4
  67. streamlit/proto/Balloons_pb2.pyi +7 -1
  68. streamlit/proto/BidiComponent_pb2.pyi +10 -4
  69. streamlit/proto/Block_pb2.pyi +35 -35
  70. streamlit/proto/BokehChart_pb2.pyi +7 -1
  71. streamlit/proto/ButtonGroup_pb2.pyi +9 -9
  72. streamlit/proto/Button_pb2.py +2 -2
  73. streamlit/proto/Button_pb2.pyi +11 -2
  74. streamlit/proto/CameraInput_pb2.pyi +7 -1
  75. streamlit/proto/ChatInput_pb2.py +6 -6
  76. streamlit/proto/ChatInput_pb2.pyi +18 -6
  77. streamlit/proto/Checkbox_pb2.pyi +3 -3
  78. streamlit/proto/ClientState_pb2.pyi +10 -4
  79. streamlit/proto/Code_pb2.pyi +7 -1
  80. streamlit/proto/ColorPicker_pb2.pyi +7 -1
  81. streamlit/proto/Common_pb2.py +3 -3
  82. streamlit/proto/Common_pb2.pyi +35 -23
  83. streamlit/proto/Components_pb2.pyi +19 -13
  84. streamlit/proto/DataFrame_pb2.pyi +55 -49
  85. streamlit/proto/DateInput_pb2.pyi +7 -1
  86. streamlit/proto/DateTimeInput_pb2.py +28 -0
  87. streamlit/proto/DateTimeInput_pb2.pyi +92 -0
  88. streamlit/proto/DeckGlJsonChart_pb2.pyi +3 -3
  89. streamlit/proto/Delta_pb2.pyi +7 -1
  90. streamlit/proto/DocString_pb2.pyi +10 -4
  91. streamlit/proto/DownloadButton_pb2.py +2 -2
  92. streamlit/proto/DownloadButton_pb2.pyi +16 -2
  93. streamlit/proto/Element_pb2.py +5 -3
  94. streamlit/proto/Element_pb2.pyi +23 -5
  95. streamlit/proto/Empty_pb2.pyi +7 -1
  96. streamlit/proto/Exception_pb2.pyi +7 -1
  97. streamlit/proto/Favicon_pb2.pyi +7 -1
  98. streamlit/proto/FileUploader_pb2.pyi +7 -1
  99. streamlit/proto/ForwardMsg_pb2.py +12 -10
  100. streamlit/proto/ForwardMsg_pb2.pyi +42 -15
  101. streamlit/proto/GapSize_pb2.pyi +4 -4
  102. streamlit/proto/GitInfo_pb2.pyi +3 -3
  103. streamlit/proto/GraphVizChart_pb2.pyi +7 -1
  104. streamlit/proto/Heading_pb2.pyi +7 -1
  105. streamlit/proto/HeightConfig_pb2.pyi +7 -1
  106. streamlit/proto/Html_pb2.py +2 -2
  107. streamlit/proto/Html_pb2.pyi +11 -2
  108. streamlit/proto/IFrame_pb2.pyi +7 -1
  109. streamlit/proto/Image_pb2.pyi +10 -4
  110. streamlit/proto/Json_pb2.pyi +7 -1
  111. streamlit/proto/LabelVisibilityMessage_pb2.pyi +3 -3
  112. streamlit/proto/LinkButton_pb2.py +2 -2
  113. streamlit/proto/LinkButton_pb2.pyi +15 -2
  114. streamlit/proto/Logo_pb2.pyi +7 -1
  115. streamlit/proto/Markdown_pb2.pyi +3 -3
  116. streamlit/proto/Metric_pb2.pyi +7 -7
  117. streamlit/proto/MetricsEvent_pb2.pyi +10 -4
  118. streamlit/proto/MultiSelect_pb2.pyi +7 -1
  119. streamlit/proto/NamedDataSet_pb2.pyi +7 -1
  120. streamlit/proto/Navigation_pb2.pyi +3 -3
  121. streamlit/proto/NewSession_pb2.pyi +40 -40
  122. streamlit/proto/NumberInput_pb2.pyi +3 -3
  123. streamlit/proto/PageConfig_pb2.pyi +7 -7
  124. streamlit/proto/PageInfo_pb2.pyi +7 -1
  125. streamlit/proto/PageLink_pb2.py +2 -2
  126. streamlit/proto/PageLink_pb2.pyi +11 -2
  127. streamlit/proto/PageNotFound_pb2.pyi +7 -1
  128. streamlit/proto/PageProfile_pb2.pyi +13 -7
  129. streamlit/proto/PagesChanged_pb2.pyi +7 -1
  130. streamlit/proto/ParentMessage_pb2.pyi +7 -1
  131. streamlit/proto/PlotlyChart_pb2.pyi +6 -6
  132. streamlit/proto/Progress_pb2.pyi +7 -1
  133. streamlit/proto/Radio_pb2.pyi +7 -1
  134. streamlit/proto/RootContainer_pb2.pyi +1 -1
  135. streamlit/proto/Selectbox_pb2.pyi +7 -1
  136. streamlit/proto/SessionEvent_pb2.pyi +7 -1
  137. streamlit/proto/SessionStatus_pb2.pyi +7 -1
  138. streamlit/proto/Skeleton_pb2.pyi +3 -3
  139. streamlit/proto/Slider_pb2.pyi +5 -5
  140. streamlit/proto/Snow_pb2.pyi +7 -1
  141. streamlit/proto/Space_pb2.pyi +7 -1
  142. streamlit/proto/Spinner_pb2.pyi +7 -1
  143. streamlit/proto/TextAlignmentConfig_pb2.py +29 -0
  144. streamlit/proto/TextAlignmentConfig_pb2.pyi +68 -0
  145. streamlit/proto/TextArea_pb2.pyi +7 -1
  146. streamlit/proto/TextInput_pb2.pyi +3 -3
  147. streamlit/proto/Text_pb2.pyi +7 -1
  148. streamlit/proto/TimeInput_pb2.pyi +7 -1
  149. streamlit/proto/Toast_pb2.pyi +7 -1
  150. streamlit/proto/VegaLiteChart_pb2.pyi +7 -1
  151. streamlit/proto/Video_pb2.pyi +6 -6
  152. streamlit/proto/WidgetStates_pb2.pyi +10 -4
  153. streamlit/proto/WidthConfig_pb2.pyi +7 -1
  154. streamlit/proto/openmetrics_data_model_pb2.pyi +52 -52
  155. streamlit/runtime/app_session.py +38 -1
  156. streamlit/runtime/caching/cache_data_api.py +1 -1
  157. streamlit/runtime/caching/cache_resource_api.py +2 -2
  158. streamlit/runtime/caching/cache_utils.py +1 -1
  159. streamlit/runtime/caching/hashing.py +1 -1
  160. streamlit/runtime/download_data_util.py +53 -0
  161. streamlit/runtime/forward_msg_queue.py +1 -0
  162. streamlit/runtime/media_file_manager.py +178 -2
  163. streamlit/runtime/metrics_util.py +87 -3
  164. streamlit/runtime/scriptrunner/script_runner.py +3 -1
  165. streamlit/runtime/state/query_params.py +80 -29
  166. streamlit/runtime/state/session_state.py +2 -2
  167. streamlit/static/index.html +1 -1
  168. streamlit/static/manifest.json +530 -229
  169. streamlit/static/static/js/{ErrorOutline.esm.YoJdlW1p.js → ErrorOutline.esm.sMJdFExW.js} +1 -1
  170. streamlit/static/static/js/{FileDownload.esm.Ddx8VEYy.js → FileDownload.esm.CV-WYqBn.js} +1 -1
  171. streamlit/static/static/js/{FileHelper.90EtOmj9.js → FileHelper.5nCh9KDY.js} +3 -3
  172. streamlit/static/static/js/{FormClearHelper.BB1Km6eP.js → FormClearHelper.-9RbsnV0.js} +1 -1
  173. streamlit/static/static/js/IFrameUtil.DefezniK.js +1 -0
  174. streamlit/static/static/js/InputInstructions.2R3tBtW9.js +1 -0
  175. streamlit/static/static/js/Particles.DDHoXFxh.js +1 -0
  176. streamlit/static/static/js/{ProgressBar.DLY8H6nE.js → ProgressBar.BxmfHxKu.js} +2 -2
  177. streamlit/static/static/js/StreamlitSyntaxHighlighter.BFWV0oqR.js +20 -0
  178. streamlit/static/static/js/{Toolbar.D8nHCkuz.js → Toolbar.DMgU0Vgw.js} +1 -1
  179. streamlit/static/static/js/_arrayIncludes.B19Iyn2B.js +1 -0
  180. streamlit/static/static/js/_baseIndexOf.BTknn6Gb.js +1 -0
  181. streamlit/static/static/js/{base-input.CJGiNqed.js → base-input.BXTqYbyG.js} +4 -4
  182. streamlit/static/static/js/{checkbox.Cpdd482O.js → checkbox.5xWaqPqm.js} +1 -1
  183. streamlit/static/static/js/{createSuper.CuQIogbW.js → createSuper.OIgV8wc-.js} +1 -1
  184. streamlit/static/static/js/data-grid-overlay-editor.B4RIu9cw.js +1 -0
  185. streamlit/static/static/js/{downloader.CN0K7xlu.js → downloader.DwCJck8O.js} +1 -1
  186. streamlit/static/static/js/embed.HKcgTiLB.js +195 -0
  187. streamlit/static/static/js/{es6.BJcsVXQ0.js → es6.4AP97RGk.js} +2 -2
  188. streamlit/static/static/js/{iframeResizer.contentWindow.XzUvQqcZ.js → iframeResizer.contentWindow.BZAsvL9q.js} +1 -1
  189. streamlit/static/static/js/index.-3selq_5.js +2 -0
  190. streamlit/static/static/js/index.1ylynMAS.js +7 -0
  191. streamlit/static/static/js/{index.CxIUUfab.js → index.6UunrySF.js} +53 -122
  192. streamlit/static/static/js/index.8HslT92O.js +14 -0
  193. streamlit/static/static/js/index.B0TPxAZ1.js +1 -0
  194. streamlit/static/static/js/index.B0yp3bM1.js +6 -0
  195. streamlit/static/static/js/index.BHWBaOWH.js +1 -0
  196. streamlit/static/static/js/index.BJas6XzW.js +1 -0
  197. streamlit/static/static/js/index.BKIlG7Ng.js +3 -0
  198. streamlit/static/static/js/index.BMU6zZRk.js +1 -0
  199. streamlit/static/static/js/index.BNMLO-0p.js +2 -0
  200. streamlit/static/static/js/index.BPmBNTel.js +1 -0
  201. streamlit/static/static/js/index.BVuohWM1.js +1 -0
  202. streamlit/static/static/js/index.B_AvdOKC.js +1 -0
  203. streamlit/static/static/js/index.BjQIH-3U.js +1 -0
  204. streamlit/static/static/js/index.BrqtKtSu.js +2 -0
  205. streamlit/static/static/js/index.Buc7XrOl.js +188 -0
  206. streamlit/static/static/js/index.CIC9pLsG.js +2 -0
  207. streamlit/static/static/js/index.CP2YZ73v.js +1 -0
  208. streamlit/static/static/js/index.CSbah0y4.js +27 -0
  209. streamlit/static/static/js/index.CbiYVMT1.js +1 -0
  210. streamlit/static/static/js/index.CbxllBj8.js +1 -0
  211. streamlit/static/static/js/index.Cd1D2eGF.js +263 -0
  212. streamlit/static/static/js/index.Ckcqwai8.js +2 -0
  213. streamlit/static/static/js/index.CqTPbV5Y.js +151 -0
  214. streamlit/static/static/js/index.CxXo5UKy.js +1 -0
  215. streamlit/static/static/js/index.CxbL5FgL.js +1 -0
  216. streamlit/static/static/js/index.D52dMvK5.js +1 -0
  217. streamlit/static/static/js/index.DBUdji-9.js +3 -0
  218. streamlit/static/static/js/index.DMU3coc2.js +1 -0
  219. streamlit/static/static/js/index.DN4sfQLP.js +1 -0
  220. streamlit/static/static/js/{index.DPUXkcQL.js → index.DRDE9rnx.js} +1 -1
  221. streamlit/static/static/js/{index.B_dWA3vd.js → index.DY9Ac89e.js} +2 -2
  222. streamlit/static/static/js/index.DYKCsDvl.js +1 -0
  223. streamlit/static/static/js/index.Da9gznCC.js +1 -0
  224. streamlit/static/static/js/index.DfIRibXG.js +1 -0
  225. streamlit/static/static/js/{index.D3GPA5k4.js → index.Dg5zbEp2.js} +9 -40
  226. streamlit/static/static/js/index.Di9I2cid.js +1 -0
  227. streamlit/static/static/js/index.DkpEv0uV.js +1 -0
  228. streamlit/static/static/js/index.DwJ9Vhsl.js +1 -0
  229. streamlit/static/static/js/index.L7erTnMm.js +1 -0
  230. streamlit/static/static/js/{index.DOFlg3dS.js → index.NaDyAN1s.js} +1 -1
  231. streamlit/static/static/js/index.RNTPpVde.js +1 -0
  232. streamlit/static/static/js/index.VFDFuf_7.js +1 -0
  233. streamlit/static/static/js/index.W-bl3NDo.js +1 -0
  234. streamlit/static/static/js/index.XYozEjwK.js +1 -0
  235. streamlit/static/static/js/index.oyLQ4pue.js +1 -0
  236. streamlit/static/static/js/index.q4fLUQtC.js +11 -0
  237. streamlit/static/static/js/index.q9puCQgK.js +2 -0
  238. streamlit/static/static/js/index.xZBTXGNC.js +1 -0
  239. streamlit/static/static/js/{input.D4MN_FzN.js → input.CcvrgErO.js} +2 -2
  240. streamlit/static/static/js/main.eVHOp4Th.js +13 -0
  241. streamlit/static/static/js/{memory.DrZjtdGT.js → memory.Ck_sLv5Y.js} +1 -1
  242. streamlit/static/static/js/moment.C3j7ZXd7.js +4 -0
  243. streamlit/static/static/js/number-overlay-editor.DgcLMWOy.js +9 -0
  244. streamlit/static/static/js/pandasStylerUtils.DqP0h70z.js +1 -0
  245. streamlit/static/static/js/{possibleConstructorReturn.exeeJQEP.js → possibleConstructorReturn.C_51n46K.js} +1 -1
  246. streamlit/static/static/js/{sandbox.ClO3IuUr.js → sandbox.Q-g3QIZJ.js} +1 -1
  247. streamlit/static/static/js/styled-components.e0V96rJw.js +1 -0
  248. streamlit/static/static/js/threshold.Q1mXg5rX.js +1 -0
  249. streamlit/static/static/js/throttle.D3b5WILl.js +1 -0
  250. streamlit/static/static/js/{timepicker.DAhu-vcF.js → timepicker.Bpn70xGc.js} +1 -1
  251. streamlit/static/static/js/timer.C2hYhUse.js +1 -0
  252. streamlit/static/static/js/{toConsumableArray.DNbljYEC.js → toConsumableArray.DIN_ys1J.js} +1 -1
  253. streamlit/static/static/js/uniqueId.B27POWT6.js +1 -0
  254. streamlit/static/static/js/urls.BwSlolu9.js +1 -0
  255. streamlit/static/static/js/{useBasicWidgetState.D6sOH6oI.js → useBasicWidgetState.DA3_qaXD.js} +1 -1
  256. streamlit/static/static/js/useIntlLocale.BSq6SANa.js +12 -0
  257. streamlit/static/static/js/{useTextInputAutoExpand.4u3_GcuN.js → useTextInputAutoExpand.ytEW5QmA.js} +1 -1
  258. streamlit/static/static/js/useUpdateUiValue.DOxWBNiI.js +1 -0
  259. streamlit/static/static/js/useWaveformController.BCmk6WLk.js +1 -0
  260. streamlit/static/static/js/value.B4vHRSi7.js +1 -0
  261. streamlit/static/static/js/withCalculatedWidth.ChdrMItN.js +1 -0
  262. streamlit/static/static/js/withFullScreenWrapper.7j_lzlaF.js +1 -0
  263. streamlit/string_util.py +8 -1
  264. streamlit/testing/v1/app_test.py +15 -0
  265. streamlit/testing/v1/element_tree.py +62 -0
  266. streamlit/web/bootstrap.py +24 -0
  267. streamlit/web/server/oauth_authlib_routes.py +5 -2
  268. streamlit/web/server/upload_file_request_handler.py +16 -0
  269. {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/METADATA +9 -5
  270. {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/RECORD +274 -239
  271. streamlit/static/static/js/InputInstructions.jhH15PqV.js +0 -1
  272. streamlit/static/static/js/Particles.DUsputn1.js +0 -1
  273. streamlit/static/static/js/data-grid-overlay-editor.2Ufgxc6y.js +0 -1
  274. streamlit/static/static/js/index.B1ZQh4P1.js +0 -1
  275. streamlit/static/static/js/index.BKstZk0M.js +0 -27
  276. streamlit/static/static/js/index.BMcFsUee.js +0 -1
  277. streamlit/static/static/js/index.BR-IdcTb.js +0 -2
  278. streamlit/static/static/js/index.BgnZEMVh.js +0 -1
  279. streamlit/static/static/js/index.BohqXifI.js +0 -1
  280. streamlit/static/static/js/index.Br5nxKNj.js +0 -2
  281. streamlit/static/static/js/index.BrIKVbNc.js +0 -3
  282. streamlit/static/static/js/index.BtWUPzle.js +0 -1
  283. streamlit/static/static/js/index.C0RLraek.js +0 -1
  284. streamlit/static/static/js/index.CAIjskgG.js +0 -1
  285. streamlit/static/static/js/index.CAj-7vWz.js +0 -949
  286. streamlit/static/static/js/index.CMtEit2O.js +0 -1
  287. streamlit/static/static/js/index.CkRlykEE.js +0 -12
  288. streamlit/static/static/js/index.CmN3FXfI.js +0 -1617
  289. streamlit/static/static/js/index.CwbFI1_-.js +0 -1
  290. streamlit/static/static/js/index.D2KPNy7e.js +0 -1
  291. streamlit/static/static/js/index.DGAh7DMq.js +0 -1
  292. streamlit/static/static/js/index.DKb_NvmG.js +0 -197
  293. streamlit/static/static/js/index.DMqgUYKq.js +0 -1
  294. streamlit/static/static/js/index.DX1xY89g.js +0 -1
  295. streamlit/static/static/js/index.DYATBCsq.js +0 -2
  296. streamlit/static/static/js/index.DaSmGJ76.js +0 -3
  297. streamlit/static/static/js/index.Dd7bMeLP.js +0 -1
  298. streamlit/static/static/js/index.DjmmgI5U.js +0 -1
  299. streamlit/static/static/js/index.Dq56CyM2.js +0 -1
  300. streamlit/static/static/js/index.DuiXaS5_.js +0 -7
  301. streamlit/static/static/js/index.DvFidMLe.js +0 -2
  302. streamlit/static/static/js/index.DwkhC5Pc.js +0 -1
  303. streamlit/static/static/js/index.Q-3sFn1v.js +0 -1
  304. streamlit/static/static/js/index.QJ5QO9sJ.js +0 -1
  305. streamlit/static/static/js/index.VwTaeety.js +0 -1
  306. streamlit/static/static/js/index.YOqQbeX8.js +0 -1
  307. streamlit/static/static/js/number-overlay-editor.DRwAw1In.js +0 -9
  308. streamlit/static/static/js/uniqueId.oG4Gvj1v.js +0 -1
  309. streamlit/static/static/js/useUpdateUiValue.F2R3eTeR.js +0 -1
  310. streamlit/static/static/js/withFullScreenWrapper.zothJIsI.js +0 -1
  311. {streamlit-1.51.0.data → streamlit-1.52.1.data}/scripts/streamlit.cmd +0 -0
  312. {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/WHEEL +0 -0
  313. {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/entry_points.txt +0 -0
  314. {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/top_level.txt +0 -0
streamlit/errors.py CHANGED
@@ -285,6 +285,17 @@ class StreamlitInvalidHorizontalAlignmentError(LocalizableStreamlitException):
285
285
  )
286
286
 
287
287
 
288
+ class StreamlitInvalidTextAlignmentError(LocalizableStreamlitException):
289
+ """Exception raised when an invalid text_alignment value is provided."""
290
+
291
+ def __init__(self, text_alignment: Any) -> None:
292
+ super().__init__(
293
+ 'Invalid text_alignment value: "{text_alignment}". '
294
+ 'Valid values are: `"left"`, `"center"`, `"right"`, or `"justify"`.',
295
+ text_alignment=text_alignment,
296
+ )
297
+
298
+
288
299
  # st.multiselect
289
300
  class StreamlitSelectionCountExceedsMaxError(LocalizableStreamlitException):
290
301
  """Exception raised when there are more default selections specified than the max allowable selections."""
@@ -410,6 +421,17 @@ class StreamlitMissingPageLabelError(LocalizableStreamlitException):
410
421
  )
411
422
 
412
423
 
424
+ class StreamlitQueryParamDictValueError(LocalizableStreamlitException):
425
+ """Exception raised when a query param value is a dictionary."""
426
+
427
+ def __init__(self, key: str) -> None:
428
+ super().__init__(
429
+ "Query param value for `{key}` cannot be set to a dictionary. "
430
+ "Provide a string or iterable of strings instead.",
431
+ key=key,
432
+ )
433
+
434
+
413
435
  class StreamlitPageNotFoundError(LocalizableStreamlitException):
414
436
  """Exception raised the linked page can not be found."""
415
437
 
streamlit/git_util.py CHANGED
@@ -79,7 +79,7 @@ class GitRepo:
79
79
 
80
80
  if self.git_version is not None and self.git_version >= _MIN_GIT_VERSION:
81
81
  git_root = self.repo.git.rev_parse("--show-toplevel")
82
- self.module = os.path.relpath(path, git_root)
82
+ self.module = str(os.path.relpath(path, git_root))
83
83
  except Exception:
84
84
  _LOGGER.debug(
85
85
  "Did not find a git repo at %s. This is expected if this isn't a git repo, but could "
@@ -85,6 +85,13 @@ def Page( # noqa: N802
85
85
  <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
86
86
  font library.
87
87
 
88
+ - ``"spinner"``: Displays a spinner as an icon. In this case, the
89
+ spinner only displays next to the page label in the navigation menu.
90
+ The spinner isn't used as the page favicon next to the title in the
91
+ browser tab. The favicon is the default Streamlit icon unless
92
+ otherwise specified with the ``page_icon`` parameter of
93
+ ``st.set_page_config``.
94
+
88
95
  url_path : str or None
89
96
  The page's URL pathname, which is the path relative to the app's root
90
97
  URL. If this is ``None`` (default), the URL pathname will be inferred
streamlit/net_util.py CHANGED
@@ -50,7 +50,7 @@ def get_external_ip() -> str | None:
50
50
  if response is None:
51
51
  response = _make_blocking_http_get(_AWS_CHECK_IP_HTTPS, timeout=5)
52
52
 
53
- if _looks_like_an_ip_adress(response):
53
+ if _looks_like_an_ip_address(response):
54
54
  _external_ip = response
55
55
  else:
56
56
  _LOGGER.warning(
@@ -103,7 +103,7 @@ def _make_blocking_http_get(url: str, timeout: float = 5) -> str | None:
103
103
  return None
104
104
 
105
105
 
106
- def _looks_like_an_ip_adress(address: str | None) -> bool:
106
+ def _looks_like_an_ip_address(address: str | None) -> bool:
107
107
  if address is None:
108
108
  return False
109
109
 
@@ -78,7 +78,7 @@ class Alert(google.protobuf.message.Message):
78
78
  WIDTH_CONFIG_FIELD_NUMBER: builtins.int
79
79
  body: builtins.str
80
80
  """Content to display."""
81
- format: global___Alert.Format.ValueType
81
+ format: Global___Alert.Format.ValueType
82
82
  icon: builtins.str
83
83
  @property
84
84
  def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
@@ -88,11 +88,11 @@ class Alert(google.protobuf.message.Message):
88
88
  self,
89
89
  *,
90
90
  body: builtins.str = ...,
91
- format: global___Alert.Format.ValueType = ...,
91
+ format: Global___Alert.Format.ValueType = ...,
92
92
  icon: builtins.str = ...,
93
93
  width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
94
94
  ) -> None: ...
95
95
  def HasField(self, field_name: typing.Literal["width_config", b"width_config"]) -> builtins.bool: ...
96
96
  def ClearField(self, field_name: typing.Literal["body", b"body", "format", b"format", "icon", b"icon", "width_config", b"width_config"]) -> None: ...
97
97
 
98
- global___Alert = Alert
98
+ Global___Alert: typing_extensions.TypeAlias = Alert
@@ -20,8 +20,14 @@ limitations under the License.
20
20
  import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
+ import sys
23
24
  import typing
24
25
 
26
+ if sys.version_info >= (3, 10):
27
+ import typing as typing_extensions
28
+ else:
29
+ import typing_extensions
30
+
25
31
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
26
32
 
27
33
  @typing.final
@@ -61,4 +67,4 @@ class AppPage(google.protobuf.message.Message):
61
67
  ) -> None: ...
62
68
  def ClearField(self, field_name: typing.Literal["icon", b"icon", "is_default", b"is_default", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "section_header", b"section_header", "url_pathname", b"url_pathname"]) -> None: ...
63
69
 
64
- global___AppPage = AppPage
70
+ Global___AppPage: typing_extensions.TypeAlias = AppPage
@@ -20,8 +20,14 @@ limitations under the License.
20
20
  import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
+ import sys
23
24
  import typing
24
25
 
26
+ if sys.version_info >= (3, 10):
27
+ import typing as typing_extensions
28
+ else:
29
+ import typing_extensions
30
+
25
31
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
26
32
 
27
33
  @typing.final
@@ -43,4 +49,4 @@ class ArrowData(google.protobuf.message.Message):
43
49
  ) -> None: ...
44
50
  def ClearField(self, field_name: typing.Literal["data", b"data"]) -> None: ...
45
51
 
46
- global___ArrowData = ArrowData
52
+ Global___ArrowData: typing_extensions.TypeAlias = ArrowData
@@ -21,8 +21,14 @@ import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
23
  import streamlit.proto.Arrow_pb2
24
+ import sys
24
25
  import typing
25
26
 
27
+ if sys.version_info >= (3, 10):
28
+ import typing as typing_extensions
29
+ else:
30
+ import typing_extensions
31
+
26
32
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
27
33
 
28
34
  @typing.final
@@ -54,4 +60,4 @@ class ArrowNamedDataSet(google.protobuf.message.Message):
54
60
  def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
55
61
  def ClearField(self, field_name: typing.Literal["data", b"data", "has_name", b"has_name", "name", b"name"]) -> None: ...
56
62
 
57
- global___ArrowNamedDataSet = ArrowNamedDataSet
63
+ Global___ArrowNamedDataSet: typing_extensions.TypeAlias = ArrowNamedDataSet
@@ -24,8 +24,14 @@ import google.protobuf.internal.containers
24
24
  import google.protobuf.message
25
25
  import streamlit.proto.ArrowNamedDataSet_pb2
26
26
  import streamlit.proto.Arrow_pb2
27
+ import sys
27
28
  import typing
28
29
 
30
+ if sys.version_info >= (3, 10):
31
+ import typing as typing_extensions
32
+ else:
33
+ import typing_extensions
34
+
29
35
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
30
36
 
31
37
  @typing.final
@@ -81,4 +87,4 @@ class ArrowVegaLiteChart(google.protobuf.message.Message):
81
87
  def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
82
88
  def ClearField(self, field_name: typing.Literal["data", b"data", "datasets", b"datasets", "form_id", b"form_id", "id", b"id", "selection_mode", b"selection_mode", "spec", b"spec", "theme", b"theme", "use_container_width", b"use_container_width"]) -> None: ...
83
89
 
84
- global___ArrowVegaLiteChart = ArrowVegaLiteChart
90
+ Global___ArrowVegaLiteChart: typing_extensions.TypeAlias = ArrowVegaLiteChart
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
14
14
 
15
15
 
16
16
 
17
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Arrow.proto\"\xd1\x04\n\x05\x41rrow\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x17\n\x06styler\x18\x02 \x01(\x0b\x32\x07.Styler\x12\x11\n\x05width\x18\x03 \x01(\rB\x02\x18\x01\x12\x12\n\x06height\x18\x04 \x01(\rB\x02\x18\x01\x12\x1f\n\x13use_container_width\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\n\n\x02id\x18\x06 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x07 \x01(\t\x12(\n\x0c\x65\x64iting_mode\x18\x08 \x01(\x0e\x32\x12.Arrow.EditingMode\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x0f\n\x07\x66orm_id\x18\n \x01(\t\x12\x14\n\x0c\x63olumn_order\x18\x0b \x03(\t\x12,\n\x0eselection_mode\x18\x0c \x03(\x0e\x32\x14.Arrow.SelectionMode\x12\x17\n\nrow_height\x18\r \x01(\rH\x00\x88\x01\x01\x12&\n\x0b\x62order_mode\x18\x0e \x01(\x0e\x32\x11.Arrow.BorderMode\"4\n\x0b\x45\x64itingMode\x12\r\n\tREAD_ONLY\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02\"t\n\rSelectionMode\x12\x0e\n\nSINGLE_ROW\x10\x00\x12\r\n\tMULTI_ROW\x10\x01\x12\x11\n\rSINGLE_COLUMN\x10\x02\x12\x10\n\x0cMULTI_COLUMN\x10\x03\x12\x0f\n\x0bSINGLE_CELL\x10\x04\x12\x0e\n\nMULTI_CELL\x10\x05\"/\n\nBorderMode\x12\x07\n\x03\x41LL\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x42\r\n\x0b_row_height\"O\n\x06Styler\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61ption\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x16\n\x0e\x64isplay_values\x18\x04 \x01(\x0c\x42*\n\x1c\x63om.snowflake.apps.streamlitB\nArrowProtob\x06proto3')
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Arrow.proto\"\xfb\x04\n\x05\x41rrow\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x17\n\x06styler\x18\x02 \x01(\x0b\x32\x07.Styler\x12\x11\n\x05width\x18\x03 \x01(\rB\x02\x18\x01\x12\x12\n\x06height\x18\x04 \x01(\rB\x02\x18\x01\x12\x1f\n\x13use_container_width\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\n\n\x02id\x18\x06 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x07 \x01(\t\x12(\n\x0c\x65\x64iting_mode\x18\x08 \x01(\x0e\x32\x12.Arrow.EditingMode\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x0f\n\x07\x66orm_id\x18\n \x01(\t\x12\x14\n\x0c\x63olumn_order\x18\x0b \x03(\t\x12,\n\x0eselection_mode\x18\x0c \x03(\x0e\x32\x14.Arrow.SelectionMode\x12\x17\n\nrow_height\x18\r \x01(\rH\x00\x88\x01\x01\x12&\n\x0b\x62order_mode\x18\x0e \x01(\x0e\x32\x11.Arrow.BorderMode\x12\x18\n\x0bplaceholder\x18\x0f \x01(\tH\x01\x88\x01\x01\"4\n\x0b\x45\x64itingMode\x12\r\n\tREAD_ONLY\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02\"t\n\rSelectionMode\x12\x0e\n\nSINGLE_ROW\x10\x00\x12\r\n\tMULTI_ROW\x10\x01\x12\x11\n\rSINGLE_COLUMN\x10\x02\x12\x10\n\x0cMULTI_COLUMN\x10\x03\x12\x0f\n\x0bSINGLE_CELL\x10\x04\x12\x0e\n\nMULTI_CELL\x10\x05\"/\n\nBorderMode\x12\x07\n\x03\x41LL\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x42\r\n\x0b_row_heightB\x0e\n\x0c_placeholder\"O\n\x06Styler\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61ption\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x16\n\x0e\x64isplay_values\x18\x04 \x01(\x0c\x42*\n\x1c\x63om.snowflake.apps.streamlitB\nArrowProtob\x06proto3')
18
18
 
19
19
  _globals = globals()
20
20
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -29,13 +29,13 @@ if not _descriptor._USE_C_DESCRIPTORS:
29
29
  _globals['_ARROW'].fields_by_name['use_container_width']._loaded_options = None
30
30
  _globals['_ARROW'].fields_by_name['use_container_width']._serialized_options = b'\030\001'
31
31
  _globals['_ARROW']._serialized_start=32
32
- _globals['_ARROW']._serialized_end=625
33
- _globals['_ARROW_EDITINGMODE']._serialized_start=391
34
- _globals['_ARROW_EDITINGMODE']._serialized_end=443
35
- _globals['_ARROW_SELECTIONMODE']._serialized_start=445
36
- _globals['_ARROW_SELECTIONMODE']._serialized_end=561
37
- _globals['_ARROW_BORDERMODE']._serialized_start=563
38
- _globals['_ARROW_BORDERMODE']._serialized_end=610
39
- _globals['_STYLER']._serialized_start=627
40
- _globals['_STYLER']._serialized_end=706
32
+ _globals['_ARROW']._serialized_end=667
33
+ _globals['_ARROW_EDITINGMODE']._serialized_start=417
34
+ _globals['_ARROW_EDITINGMODE']._serialized_end=469
35
+ _globals['_ARROW_SELECTIONMODE']._serialized_start=471
36
+ _globals['_ARROW_SELECTIONMODE']._serialized_end=587
37
+ _globals['_ARROW_BORDERMODE']._serialized_start=589
38
+ _globals['_ARROW_BORDERMODE']._serialized_end=636
39
+ _globals['_STYLER']._serialized_start=669
40
+ _globals['_STYLER']._serialized_end=748
41
41
  # @@protoc_insertion_point(module_scope)
@@ -132,6 +132,7 @@ class Arrow(google.protobuf.message.Message):
132
132
  SELECTION_MODE_FIELD_NUMBER: builtins.int
133
133
  ROW_HEIGHT_FIELD_NUMBER: builtins.int
134
134
  BORDER_MODE_FIELD_NUMBER: builtins.int
135
+ PLACEHOLDER_FIELD_NUMBER: builtins.int
135
136
  data: builtins.bytes
136
137
  """The serialized arrow dataframe"""
137
138
  width: builtins.int
@@ -144,7 +145,7 @@ class Arrow(google.protobuf.message.Message):
144
145
  """The id of the widget, this is required if the dataframe is editable"""
145
146
  columns: builtins.str
146
147
  """Column configuration as JSON"""
147
- editing_mode: global___Arrow.EditingMode.ValueType
148
+ editing_mode: Global___Arrow.EditingMode.ValueType
148
149
  """Activate table editing"""
149
150
  disabled: builtins.bool
150
151
  """Deactivates editing"""
@@ -152,12 +153,14 @@ class Arrow(google.protobuf.message.Message):
152
153
  """The form ID of the widget, this is required if the dataframe is editable"""
153
154
  row_height: builtins.int
154
155
  """Row height in pixels"""
155
- border_mode: global___Arrow.BorderMode.ValueType
156
+ border_mode: Global___Arrow.BorderMode.ValueType
156
157
  """How to show borders around the table and between cells. Note that this property
157
158
  is only used for `st.table` at the moment.
158
159
  """
160
+ placeholder: builtins.str
161
+ """Placeholder string used when rendering missing values (e.g. nulls, NaNs)."""
159
162
  @property
160
- def styler(self) -> global___Styler:
163
+ def styler(self) -> Global___Styler:
161
164
  """Pandas styler information"""
162
165
 
163
166
  @property
@@ -165,32 +168,36 @@ class Arrow(google.protobuf.message.Message):
165
168
  """Defines the order in which columns are displayed"""
166
169
 
167
170
  @property
168
- def selection_mode(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Arrow.SelectionMode.ValueType]:
171
+ def selection_mode(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[Global___Arrow.SelectionMode.ValueType]:
169
172
  """Activated dataframe selections events"""
170
173
 
171
174
  def __init__(
172
175
  self,
173
176
  *,
174
177
  data: builtins.bytes = ...,
175
- styler: global___Styler | None = ...,
178
+ styler: Global___Styler | None = ...,
176
179
  width: builtins.int = ...,
177
180
  height: builtins.int = ...,
178
181
  use_container_width: builtins.bool = ...,
179
182
  id: builtins.str = ...,
180
183
  columns: builtins.str = ...,
181
- editing_mode: global___Arrow.EditingMode.ValueType = ...,
184
+ editing_mode: Global___Arrow.EditingMode.ValueType = ...,
182
185
  disabled: builtins.bool = ...,
183
186
  form_id: builtins.str = ...,
184
187
  column_order: collections.abc.Iterable[builtins.str] | None = ...,
185
- selection_mode: collections.abc.Iterable[global___Arrow.SelectionMode.ValueType] | None = ...,
188
+ selection_mode: collections.abc.Iterable[Global___Arrow.SelectionMode.ValueType] | None = ...,
186
189
  row_height: builtins.int | None = ...,
187
- border_mode: global___Arrow.BorderMode.ValueType = ...,
190
+ border_mode: Global___Arrow.BorderMode.ValueType = ...,
191
+ placeholder: builtins.str | None = ...,
188
192
  ) -> None: ...
189
- def HasField(self, field_name: typing.Literal["_row_height", b"_row_height", "row_height", b"row_height", "styler", b"styler"]) -> builtins.bool: ...
190
- def ClearField(self, field_name: typing.Literal["_row_height", b"_row_height", "border_mode", b"border_mode", "column_order", b"column_order", "columns", b"columns", "data", b"data", "disabled", b"disabled", "editing_mode", b"editing_mode", "form_id", b"form_id", "height", b"height", "id", b"id", "row_height", b"row_height", "selection_mode", b"selection_mode", "styler", b"styler", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
193
+ def HasField(self, field_name: typing.Literal["_placeholder", b"_placeholder", "_row_height", b"_row_height", "placeholder", b"placeholder", "row_height", b"row_height", "styler", b"styler"]) -> builtins.bool: ...
194
+ def ClearField(self, field_name: typing.Literal["_placeholder", b"_placeholder", "_row_height", b"_row_height", "border_mode", b"border_mode", "column_order", b"column_order", "columns", b"columns", "data", b"data", "disabled", b"disabled", "editing_mode", b"editing_mode", "form_id", b"form_id", "height", b"height", "id", b"id", "placeholder", b"placeholder", "row_height", b"row_height", "selection_mode", b"selection_mode", "styler", b"styler", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
195
+ @typing.overload
196
+ def WhichOneof(self, oneof_group: typing.Literal["_placeholder", b"_placeholder"]) -> typing.Literal["placeholder"] | None: ...
197
+ @typing.overload
191
198
  def WhichOneof(self, oneof_group: typing.Literal["_row_height", b"_row_height"]) -> typing.Literal["row_height"] | None: ...
192
199
 
193
- global___Arrow = Arrow
200
+ Global___Arrow: typing_extensions.TypeAlias = Arrow
194
201
 
195
202
  @typing.final
196
203
  class Styler(google.protobuf.message.Message):
@@ -222,4 +229,4 @@ class Styler(google.protobuf.message.Message):
222
229
  ) -> None: ...
223
230
  def ClearField(self, field_name: typing.Literal["caption", b"caption", "display_values", b"display_values", "styles", b"styles", "uuid", b"uuid"]) -> None: ...
224
231
 
225
- global___Styler = Styler
232
+ Global___Styler: typing_extensions.TypeAlias = Styler
@@ -21,8 +21,14 @@ import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
23
  import streamlit.proto.LabelVisibilityMessage_pb2
24
+ import sys
24
25
  import typing
25
26
 
27
+ if sys.version_info >= (3, 10):
28
+ import typing as typing_extensions
29
+ else:
30
+ import typing_extensions
31
+
26
32
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
27
33
 
28
34
  @typing.final
@@ -59,4 +65,4 @@ class AudioInput(google.protobuf.message.Message):
59
65
  def ClearField(self, field_name: typing.Literal["_sample_rate", b"_sample_rate", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "sample_rate", b"sample_rate"]) -> None: ...
60
66
  def WhichOneof(self, oneof_group: typing.Literal["_sample_rate", b"_sample_rate"]) -> typing.Literal["sample_rate"] | None: ...
61
67
 
62
- global___AudioInput = AudioInput
68
+ Global___AudioInput: typing_extensions.TypeAlias = AudioInput
@@ -21,8 +21,14 @@ import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
23
  import streamlit.proto.WidthConfig_pb2
24
+ import sys
24
25
  import typing
25
26
 
27
+ if sys.version_info >= (3, 10):
28
+ import typing as typing_extensions
29
+ else:
30
+ import typing_extensions
31
+
26
32
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
27
33
 
28
34
  @typing.final
@@ -62,4 +68,4 @@ class Audio(google.protobuf.message.Message):
62
68
  def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "autoplay", b"autoplay", "end_time", b"end_time", "id", b"id", "loop", b"loop", "start_time", b"start_time", "url", b"url", "width_config", b"width_config"]) -> None: ...
63
69
  def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
64
70
 
65
- global___Audio = Audio
71
+ Global___Audio: typing_extensions.TypeAlias = Audio
@@ -20,8 +20,14 @@ limitations under the License.
20
20
  import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
+ import sys
23
24
  import typing
24
25
 
26
+ if sys.version_info >= (3, 10):
27
+ import typing as typing_extensions
28
+ else:
29
+ import typing_extensions
30
+
25
31
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
26
32
 
27
33
  @typing.final
@@ -38,4 +44,4 @@ class AuthRedirect(google.protobuf.message.Message):
38
44
  ) -> None: ...
39
45
  def ClearField(self, field_name: typing.Literal["url", b"url"]) -> None: ...
40
46
 
41
- global___AuthRedirect = AuthRedirect
47
+ Global___AuthRedirect: typing_extensions.TypeAlias = AuthRedirect
@@ -20,8 +20,14 @@ limitations under the License.
20
20
  import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
+ import sys
23
24
  import typing
24
25
 
26
+ if sys.version_info >= (3, 10):
27
+ import typing as typing_extensions
28
+ else:
29
+ import typing_extensions
30
+
25
31
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
26
32
 
27
33
  @typing.final
@@ -42,4 +48,4 @@ class AutoRerun(google.protobuf.message.Message):
42
48
  ) -> None: ...
43
49
  def ClearField(self, field_name: typing.Literal["fragment_id", b"fragment_id", "interval", b"interval"]) -> None: ...
44
50
 
45
- global___AutoRerun = AutoRerun
51
+ Global___AutoRerun: typing_extensions.TypeAlias = AutoRerun
@@ -16,7 +16,7 @@ from streamlit.proto import ClientState_pb2 as streamlit_dot_proto_dot_ClientSta
16
16
  from streamlit.proto import Common_pb2 as streamlit_dot_proto_dot_Common__pb2
17
17
 
18
18
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dstreamlit/proto/BackMsg.proto\x1a!streamlit/proto/ClientState.proto\x1a\x1cstreamlit/proto/Common.proto\"\xf2\x02\n\x07\x42\x61\x63kMsg\x12\x15\n\x0b\x63lear_cache\x18\x05 \x01(\x08H\x00\x12\x19\n\x0fset_run_on_save\x18\x06 \x01(\x08H\x00\x12\x15\n\x0bstop_script\x18\x07 \x01(\x08H\x00\x12$\n\x0crerun_script\x18\x0b \x01(\x0b\x32\x0c.ClientStateH\x00\x12\x17\n\rload_git_info\x18\x0c \x01(\x08H\x00\x12$\n\x1a\x64\x65\x62ug_disconnect_websocket\x18\x0e \x01(\x08H\x00\x12 \n\x16\x64\x65\x62ug_shutdown_runtime\x18\x0f \x01(\x08H\x00\x12-\n\x11\x66ile_urls_request\x18\x10 \x01(\x0b\x32\x10.FileURLsRequestH\x00\x12\x17\n\rapp_heartbeat\x18\x11 \x01(\x08H\x00\x12\x1d\n\x15\x64\x65\x62ug_last_backmsg_id\x18\r \x01(\tB\x06\n\x04typeJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\x42,\n\x1c\x63om.snowflake.apps.streamlitB\x0c\x42\x61\x63kMsgProtob\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dstreamlit/proto/BackMsg.proto\x1a!streamlit/proto/ClientState.proto\x1a\x1cstreamlit/proto/Common.proto\"\xa9\x03\n\x07\x42\x61\x63kMsg\x12\x15\n\x0b\x63lear_cache\x18\x05 \x01(\x08H\x00\x12\x19\n\x0fset_run_on_save\x18\x06 \x01(\x08H\x00\x12\x15\n\x0bstop_script\x18\x07 \x01(\x08H\x00\x12$\n\x0crerun_script\x18\x0b \x01(\x0b\x32\x0c.ClientStateH\x00\x12\x17\n\rload_git_info\x18\x0c \x01(\x08H\x00\x12$\n\x1a\x64\x65\x62ug_disconnect_websocket\x18\x0e \x01(\x08H\x00\x12 \n\x16\x64\x65\x62ug_shutdown_runtime\x18\x0f \x01(\x08H\x00\x12-\n\x11\x66ile_urls_request\x18\x10 \x01(\x0b\x32\x10.FileURLsRequestH\x00\x12\x17\n\rapp_heartbeat\x18\x11 \x01(\x08H\x00\x12\x35\n\x15\x64\x65\x66\x65rred_file_request\x18\x12 \x01(\x0b\x32\x14.DeferredFileRequestH\x00\x12\x1d\n\x15\x64\x65\x62ug_last_backmsg_id\x18\r \x01(\tB\x06\n\x04typeJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\":\n\x13\x44\x65\x66\x65rredFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x12\n\nsession_id\x18\x02 \x01(\tB,\n\x1c\x63om.snowflake.apps.streamlitB\x0c\x42\x61\x63kMsgProtob\x06proto3')
20
20
 
21
21
  _globals = globals()
22
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -25,5 +25,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
25
25
  _globals['DESCRIPTOR']._loaded_options = None
26
26
  _globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\014BackMsgProto'
27
27
  _globals['_BACKMSG']._serialized_start=99
28
- _globals['_BACKMSG']._serialized_end=469
28
+ _globals['_BACKMSG']._serialized_end=524
29
+ _globals['_DEFERREDFILEREQUEST']._serialized_start=526
30
+ _globals['_DEFERREDFILEREQUEST']._serialized_end=584
29
31
  # @@protoc_insertion_point(module_scope)
@@ -22,8 +22,14 @@ import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
23
  import streamlit.proto.ClientState_pb2
24
24
  import streamlit.proto.Common_pb2
25
+ import sys
25
26
  import typing
26
27
 
28
+ if sys.version_info >= (3, 10):
29
+ import typing as typing_extensions
30
+ else:
31
+ import typing_extensions
32
+
27
33
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
28
34
 
29
35
  @typing.final
@@ -41,6 +47,7 @@ class BackMsg(google.protobuf.message.Message):
41
47
  DEBUG_SHUTDOWN_RUNTIME_FIELD_NUMBER: builtins.int
42
48
  FILE_URLS_REQUEST_FIELD_NUMBER: builtins.int
43
49
  APP_HEARTBEAT_FIELD_NUMBER: builtins.int
50
+ DEFERRED_FILE_REQUEST_FIELD_NUMBER: builtins.int
44
51
  DEBUG_LAST_BACKMSG_ID_FIELD_NUMBER: builtins.int
45
52
  clear_cache: builtins.bool
46
53
  """DEPRECATED. Asks the server to run the script with this object
@@ -84,6 +91,10 @@ class BackMsg(google.protobuf.message.Message):
84
91
  files for the `st.file_uploader` widget
85
92
  """
86
93
 
94
+ @property
95
+ def deferred_file_request(self) -> Global___DeferredFileRequest:
96
+ """Requests that the server execute a deferred callable and return the URL"""
97
+
87
98
  def __init__(
88
99
  self,
89
100
  *,
@@ -96,10 +107,29 @@ class BackMsg(google.protobuf.message.Message):
96
107
  debug_shutdown_runtime: builtins.bool = ...,
97
108
  file_urls_request: streamlit.proto.Common_pb2.FileURLsRequest | None = ...,
98
109
  app_heartbeat: builtins.bool = ...,
110
+ deferred_file_request: Global___DeferredFileRequest | None = ...,
99
111
  debug_last_backmsg_id: builtins.str = ...,
100
112
  ) -> None: ...
101
- def HasField(self, field_name: typing.Literal["app_heartbeat", b"app_heartbeat", "clear_cache", b"clear_cache", "debug_disconnect_websocket", b"debug_disconnect_websocket", "debug_shutdown_runtime", b"debug_shutdown_runtime", "file_urls_request", b"file_urls_request", "load_git_info", b"load_git_info", "rerun_script", b"rerun_script", "set_run_on_save", b"set_run_on_save", "stop_script", b"stop_script", "type", b"type"]) -> builtins.bool: ...
102
- def ClearField(self, field_name: typing.Literal["app_heartbeat", b"app_heartbeat", "clear_cache", b"clear_cache", "debug_disconnect_websocket", b"debug_disconnect_websocket", "debug_last_backmsg_id", b"debug_last_backmsg_id", "debug_shutdown_runtime", b"debug_shutdown_runtime", "file_urls_request", b"file_urls_request", "load_git_info", b"load_git_info", "rerun_script", b"rerun_script", "set_run_on_save", b"set_run_on_save", "stop_script", b"stop_script", "type", b"type"]) -> None: ...
103
- def WhichOneof(self, oneof_group: typing.Literal["type", b"type"]) -> typing.Literal["clear_cache", "set_run_on_save", "stop_script", "rerun_script", "load_git_info", "debug_disconnect_websocket", "debug_shutdown_runtime", "file_urls_request", "app_heartbeat"] | None: ...
113
+ def HasField(self, field_name: typing.Literal["app_heartbeat", b"app_heartbeat", "clear_cache", b"clear_cache", "debug_disconnect_websocket", b"debug_disconnect_websocket", "debug_shutdown_runtime", b"debug_shutdown_runtime", "deferred_file_request", b"deferred_file_request", "file_urls_request", b"file_urls_request", "load_git_info", b"load_git_info", "rerun_script", b"rerun_script", "set_run_on_save", b"set_run_on_save", "stop_script", b"stop_script", "type", b"type"]) -> builtins.bool: ...
114
+ def ClearField(self, field_name: typing.Literal["app_heartbeat", b"app_heartbeat", "clear_cache", b"clear_cache", "debug_disconnect_websocket", b"debug_disconnect_websocket", "debug_last_backmsg_id", b"debug_last_backmsg_id", "debug_shutdown_runtime", b"debug_shutdown_runtime", "deferred_file_request", b"deferred_file_request", "file_urls_request", b"file_urls_request", "load_git_info", b"load_git_info", "rerun_script", b"rerun_script", "set_run_on_save", b"set_run_on_save", "stop_script", b"stop_script", "type", b"type"]) -> None: ...
115
+ def WhichOneof(self, oneof_group: typing.Literal["type", b"type"]) -> typing.Literal["clear_cache", "set_run_on_save", "stop_script", "rerun_script", "load_git_info", "debug_disconnect_websocket", "debug_shutdown_runtime", "file_urls_request", "app_heartbeat", "deferred_file_request"] | None: ...
116
+
117
+ Global___BackMsg: typing_extensions.TypeAlias = BackMsg
118
+
119
+ @typing.final
120
+ class DeferredFileRequest(google.protobuf.message.Message):
121
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
122
+
123
+ FILE_ID_FIELD_NUMBER: builtins.int
124
+ SESSION_ID_FIELD_NUMBER: builtins.int
125
+ file_id: builtins.str
126
+ session_id: builtins.str
127
+ def __init__(
128
+ self,
129
+ *,
130
+ file_id: builtins.str = ...,
131
+ session_id: builtins.str = ...,
132
+ ) -> None: ...
133
+ def ClearField(self, field_name: typing.Literal["file_id", b"file_id", "session_id", b"session_id"]) -> None: ...
104
134
 
105
- global___BackMsg = BackMsg
135
+ Global___DeferredFileRequest: typing_extensions.TypeAlias = DeferredFileRequest
@@ -20,8 +20,14 @@ limitations under the License.
20
20
  import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
+ import sys
23
24
  import typing
24
25
 
26
+ if sys.version_info >= (3, 10):
27
+ import typing as typing_extensions
28
+ else:
29
+ import typing_extensions
30
+
25
31
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
26
32
 
27
33
  @typing.final
@@ -40,4 +46,4 @@ class Balloons(google.protobuf.message.Message):
40
46
  ) -> None: ...
41
47
  def ClearField(self, field_name: typing.Literal["show", b"show"]) -> None: ...
42
48
 
43
- global___Balloons = Balloons
49
+ Global___Balloons: typing_extensions.TypeAlias = Balloons
@@ -23,8 +23,14 @@ import google.protobuf.descriptor
23
23
  import google.protobuf.internal.containers
24
24
  import google.protobuf.message
25
25
  import streamlit.proto.ArrowData_pb2
26
+ import sys
26
27
  import typing
27
28
 
29
+ if sys.version_info >= (3, 10):
30
+ import typing as typing_extensions
31
+ else:
32
+ import typing_extensions
33
+
28
34
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
29
35
 
30
36
  @typing.final
@@ -67,7 +73,7 @@ class MixedData(google.protobuf.message.Message):
67
73
  ) -> None: ...
68
74
  def ClearField(self, field_name: typing.Literal["arrow_blobs", b"arrow_blobs", "json", b"json"]) -> None: ...
69
75
 
70
- global___MixedData = MixedData
76
+ Global___MixedData: typing_extensions.TypeAlias = MixedData
71
77
 
72
78
  @typing.final
73
79
  class BidiComponent(google.protobuf.message.Message):
@@ -115,7 +121,7 @@ class BidiComponent(google.protobuf.message.Message):
115
121
  """Data-only Apache Arrow buffer for dataframe-like payloads."""
116
122
 
117
123
  @property
118
- def mixed(self) -> global___MixedData:
124
+ def mixed(self) -> Global___MixedData:
119
125
  """Mixed data with JSON structure + embedded Arrow references"""
120
126
 
121
127
  def __init__(
@@ -133,7 +139,7 @@ class BidiComponent(google.protobuf.message.Message):
133
139
  json: builtins.str = ...,
134
140
  arrow_data: streamlit.proto.ArrowData_pb2.ArrowData | None = ...,
135
141
  bytes: builtins.bytes = ...,
136
- mixed: global___MixedData | None = ...,
142
+ mixed: Global___MixedData | None = ...,
137
143
  ) -> None: ...
138
144
  def HasField(self, field_name: typing.Literal["_css_content", b"_css_content", "_css_source_path", b"_css_source_path", "_html_content", b"_html_content", "_js_content", b"_js_content", "_js_source_path", b"_js_source_path", "arrow_data", b"arrow_data", "bytes", b"bytes", "css_content", b"css_content", "css_source_path", b"css_source_path", "data", b"data", "html_content", b"html_content", "js_content", b"js_content", "js_source_path", b"js_source_path", "json", b"json", "mixed", b"mixed"]) -> builtins.bool: ...
139
145
  def ClearField(self, field_name: typing.Literal["_css_content", b"_css_content", "_css_source_path", b"_css_source_path", "_html_content", b"_html_content", "_js_content", b"_js_content", "_js_source_path", b"_js_source_path", "arrow_data", b"arrow_data", "bytes", b"bytes", "component_name", b"component_name", "css_content", b"css_content", "css_source_path", b"css_source_path", "data", b"data", "form_id", b"form_id", "html_content", b"html_content", "id", b"id", "isolate_styles", b"isolate_styles", "js_content", b"js_content", "js_source_path", b"js_source_path", "json", b"json", "mixed", b"mixed"]) -> None: ...
@@ -150,4 +156,4 @@ class BidiComponent(google.protobuf.message.Message):
150
156
  @typing.overload
151
157
  def WhichOneof(self, oneof_group: typing.Literal["data", b"data"]) -> typing.Literal["json", "arrow_data", "bytes", "mixed"] | None: ...
152
158
 
153
- global___BidiComponent = BidiComponent
159
+ Global___BidiComponent: typing_extensions.TypeAlias = BidiComponent