streamlit-nightly 1.31.2.dev20240221__py2.py3-none-any.whl → 1.31.2.dev20240223__py2.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.
@@ -51,6 +51,7 @@ from streamlit.testing.v1.element_tree import (
51
51
  ElementTree,
52
52
  Error,
53
53
  Exception,
54
+ Expander,
54
55
  Header,
55
56
  Info,
56
57
  Json,
@@ -64,6 +65,7 @@ from streamlit.testing.v1.element_tree import (
64
65
  Selectbox,
65
66
  SelectSlider,
66
67
  Slider,
68
+ Status,
67
69
  Subheader,
68
70
  Success,
69
71
  Tab,
@@ -578,6 +580,20 @@ class AppTest:
578
580
  """
579
581
  return self._tree.exception
580
582
 
583
+ @property
584
+ def expander(self) -> Sequence[Expander]:
585
+ """Sequence of all ``st.expander`` elements.
586
+
587
+ Returns
588
+ -------
589
+ List of Expandable
590
+ Sequence of all ``st.expander`` elements. Individual elements can be
591
+ accessed from a list by index (order on the page). For
592
+ example, ``at.expander[0]`` for the first element. Expandable is an
593
+ extension of the Block class.
594
+ """
595
+ return self._tree.expander
596
+
581
597
  @property
582
598
  def header(self) -> ElementList[Header]:
583
599
  """Sequence of all ``st.header`` elements.
@@ -774,6 +790,20 @@ class AppTest:
774
790
  """
775
791
  return self._tree.success
776
792
 
793
+ @property
794
+ def status(self) -> Sequence[Status]:
795
+ """Sequence of all ``st.status`` elements.
796
+
797
+ Returns
798
+ -------
799
+ List of Status
800
+ Sequence of all ``st.status`` elements. Individual elements can be
801
+ accessed from a list by index (order on the page). For
802
+ example, ``at.status[0]`` for the first element. Status is an
803
+ extension of the Block class.
804
+ """
805
+ return self._tree.status
806
+
777
807
  @property
778
808
  def table(self) -> ElementList[Table]:
779
809
  """Sequence of all ``st.table`` elements.
@@ -1446,6 +1446,10 @@ class Block:
1446
1446
  def exception(self) -> ElementList[Exception]:
1447
1447
  return ElementList(self.get("exception")) # type: ignore
1448
1448
 
1449
+ @property
1450
+ def expander(self) -> Sequence[Expander]:
1451
+ return self.get("expander") # type: ignore
1452
+
1449
1453
  @property
1450
1454
  def header(self) -> ElementList[Header]:
1451
1455
  return ElementList(self.get("header")) # type: ignore
@@ -1494,6 +1498,10 @@ class Block:
1494
1498
  def slider(self) -> WidgetList[Slider[Any]]:
1495
1499
  return WidgetList(self.get("slider")) # type: ignore
1496
1500
 
1501
+ @property
1502
+ def status(self) -> Sequence[Status]:
1503
+ return self.get("status") # type: ignore
1504
+
1497
1505
  @property
1498
1506
  def subheader(self) -> ElementList[Subheader]:
1499
1507
  return ElementList(self.get("subheader")) # type: ignore
@@ -1672,6 +1680,51 @@ class Column(Block):
1672
1680
  self.gap = proto.gap
1673
1681
 
1674
1682
 
1683
+ @dataclass(repr=False)
1684
+ class Expander(Block):
1685
+ type: str = field(repr=False)
1686
+ proto: BlockProto.Expandable = field(repr=False)
1687
+ icon: str
1688
+ label: str
1689
+
1690
+ def __init__(self, proto: BlockProto.Expandable, root: ElementTree):
1691
+ self.children = {}
1692
+ self.proto = proto
1693
+ self.root = root
1694
+ # The internal name is "expandable" but the public API uses "expander"
1695
+ # so the naming of the class and type follows the public name.
1696
+ self.type = "expander"
1697
+ self.icon = proto.icon
1698
+ self.label = proto.label
1699
+
1700
+
1701
+ @dataclass(repr=False)
1702
+ class Status(Block):
1703
+ type: str = field(repr=False)
1704
+ proto: BlockProto.Expandable = field(repr=False)
1705
+ icon: str
1706
+ label: str
1707
+
1708
+ def __init__(self, proto: BlockProto.Expandable, root: ElementTree):
1709
+ self.children = {}
1710
+ self.proto = proto
1711
+ self.root = root
1712
+ self.type = "status"
1713
+ self.icon = proto.icon
1714
+ self.label = proto.label
1715
+
1716
+ @property
1717
+ def state(self):
1718
+ if self.icon == "spinner":
1719
+ return "running"
1720
+ elif self.icon == "check":
1721
+ return "complete"
1722
+ elif self.icon == "error":
1723
+ return "error"
1724
+ else:
1725
+ raise ValueError("Unknown Status state")
1726
+
1727
+
1675
1728
  @dataclass(repr=False)
1676
1729
  class Tab(Block):
1677
1730
  """A representation of tab within ``st.tabs``."""
@@ -1897,6 +1950,11 @@ def parse_tree_from_messages(messages: list[ForwardMsg]) -> ElementTree:
1897
1950
  new_node = ChatMessage(block.chat_message, root=root)
1898
1951
  elif bty == "column":
1899
1952
  new_node = Column(block.column, root=root)
1953
+ elif bty == "expandable":
1954
+ if block.expandable.icon:
1955
+ new_node = Status(block.expandable, root=root)
1956
+ else:
1957
+ new_node = Expander(block.expandable, root=root)
1900
1958
  elif bty == "tab":
1901
1959
  new_node = Tab(block.tab, root=root)
1902
1960
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: streamlit-nightly
3
- Version: 1.31.2.dev20240221
3
+ Version: 1.31.2.dev20240223
4
4
  Summary: A faster way to build and share data apps
5
5
  Home-page: https://streamlit.io
6
6
  Author: Snowflake Inc
@@ -70,7 +70,7 @@ streamlit/elements/json.py,sha256=d1PHLaHDsrgQEv__KspWvwIvcufru_v5L871qEPStWM,33
70
70
  streamlit/elements/layouts.py,sha256=ABk6Czaol1Gadl7_QnJACuz80OQMtpv6GIojGCTXwXE,26328
71
71
  streamlit/elements/map.py,sha256=0zwVCZ9FjPUiCk5XfVe7vKg6UiLDbBLUkrHgnJz_Rr0,16299
72
72
  streamlit/elements/markdown.py,sha256=M21cweb9LTdT0XWdTrEibc2xc7qXSATP5BElthqgn1s,9913
73
- streamlit/elements/media.py,sha256=lz5hsMw1N40sJ6hA_Se2lxhC9PBL37rzV26PvdfJtp4,14715
73
+ streamlit/elements/media.py,sha256=lg6LVNZX_ZNVwiV9cVLSor7n2GcsCmzVK83DRPGSLgI,18714
74
74
  streamlit/elements/metric.py,sha256=yYg-lAl2apRyBfN3kHNIL__P8jiGHJcF31RxX8wx3io,9897
75
75
  streamlit/elements/plotly_chart.py,sha256=qUr1oB7qD88HuswyPea2cJams-lD_0_E14J8Hw11dMM,8563
76
76
  streamlit/elements/progress.py,sha256=8ke3Q517tK5sLjBjrCs8HcG_ZdQco17NypyXGNxUKoM,5627
@@ -88,6 +88,7 @@ streamlit/elements/lib/dicttools.py,sha256=NC0mMAu1vixFmth-SNLDbaLJ8A02v6AuU1GjJ
88
88
  streamlit/elements/lib/mutable_status_container.py,sha256=FdC9jtvz8br5lhBD9e0V_y3dxDtS7ifoBLfgWiWwDRI,6634
89
89
  streamlit/elements/lib/pandas_styler_utils.py,sha256=KXaslcPlLdIVk6GgMILHqYc2AY3PTmo8t0dNnah6RNw,8079
90
90
  streamlit/elements/lib/streamlit_plotly_theme.py,sha256=DgMP_PWTfFO5J__q8bGxoT3ey5z727582wDD_u3UaPU,8307
91
+ streamlit/elements/lib/subtitle_utils.py,sha256=eYfsTAKub-55nx0kik9T6nJ8dTyeUazPbMNfkIP-BNg,6246
91
92
  streamlit/elements/widgets/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
92
93
  streamlit/elements/widgets/button.py,sha256=FbQcN4HVRqDAC0jAJYvirqUSNbzVEhnoAjsIzDernNI,30775
93
94
  streamlit/elements/widgets/camera_input.py,sha256=000LviMljlejmzibfWLe_EI6SU-0rCg107dSQlL-ss8,8858
@@ -252,8 +253,8 @@ streamlit/proto/Toast_pb2.py,sha256=N0Nd0013ieO5DL1eFWnUVmdnUB0kDUn6MXoqCrB7tn4,
252
253
  streamlit/proto/Toast_pb2.pyi,sha256=U81Snk0vsUutzH6Z6cZ5nsUUbMVOQ3kgPLdITiWP6lI,1452
253
254
  streamlit/proto/VegaLiteChart_pb2.py,sha256=OCoHVRlZ2RJ-HPNG3RSv6TmbVC6gEHhy6Emvklim16s,1617
254
255
  streamlit/proto/VegaLiteChart_pb2.pyi,sha256=mCcw27_G6_oFZJDUG4SYs3IuvXrTj0LwDEED6z4MeOU,2829
255
- streamlit/proto/Video_pb2.py,sha256=Qqqy0eAt22gm1jVBifC1morBYe4P7ZPFM7KEsZv2vsk,1463
256
- streamlit/proto/Video_pb2.pyi,sha256=1ZI8IFSkDFkEKRs7qY_mCgFh1Nk7-eatxU3IEAKdFRc,2582
256
+ streamlit/proto/Video_pb2.py,sha256=VlzxewpDwGKxzfd2MFkr3sv9toSyfPLIh1EDhtEyKnk,1681
257
+ streamlit/proto/Video_pb2.pyi,sha256=OKJvKjiMQALiDwCAOng4MQ4LahIsuwOfDhyAr7ENt0Y,3552
257
258
  streamlit/proto/WidgetStates_pb2.py,sha256=fVZURV1RVB7VdUj-vtfJ0Be-OT_qxsFx2w2WH-1MaNg,2352
258
259
  streamlit/proto/WidgetStates_pb2.pyi,sha256=mOhrXe0zg4lrJrgpnmBSZt3j3X6WT5btn_gGE7cp_4s,6240
259
260
  streamlit/proto/__init__.py,sha256=tM42Nl1HAphMoWU8F7noymVPJLj3dEnqqIitEQCr2XE,668
@@ -267,7 +268,7 @@ streamlit/runtime/forward_msg_cache.py,sha256=YjoFV9BsvskZywI67AsyNSHfk-bAY2Sjru
267
268
  streamlit/runtime/forward_msg_queue.py,sha256=DPiEK078Oh0RKEt4Kloe4D9KobThxJ4Mhu27Qvubky0,5487
268
269
  streamlit/runtime/media_file_manager.py,sha256=z6qcjWk1YiNbvRj3r9vSFZuoDzRscVr9CpNmTJs2Mgc,8510
269
270
  streamlit/runtime/media_file_storage.py,sha256=hQkMC__XRjshEUD73QCSrX3vrfOOO0U7Vf1Uc6qiP90,4375
270
- streamlit/runtime/memory_media_file_storage.py,sha256=Jro5ANPR8ms6wROrRYvpvDxBrq6iPXG42DT6j7-ZMys,6307
271
+ streamlit/runtime/memory_media_file_storage.py,sha256=voiscKQAwKdhIExlsnCaZDRKrKso2yU7KlA92Cgqu2M,6331
271
272
  streamlit/runtime/memory_session_storage.py,sha256=-C1XngtxZBN-VunBKWH4BiLJPKVJyWHarcQN4Pj8B-Y,2961
272
273
  streamlit/runtime/memory_uploaded_file_manager.py,sha256=rCLvdZv2nPlWeCiHnwV8phcVV43mUCgW7BaWkmEXgpM,4422
273
274
  streamlit/runtime/metrics_util.py,sha256=29DvzbI-c74P3jwrLGPgNXKbx3Hi1Zu2u-OJ5G8wCig,14039
@@ -310,9 +311,9 @@ streamlit/runtime/state/safe_session_state.py,sha256=StGh9V-tm7MCfohgw5FFfwz8tDw
310
311
  streamlit/runtime/state/session_state.py,sha256=IQFb-1z6za9dSpeIWfm_rtk0QpG07UfxohvcHh1yTJY,26197
311
312
  streamlit/runtime/state/session_state_proxy.py,sha256=k2JJ9ZX7rMYjpzeGy0WZaBKYaWnXxrbJC5jqdnRQ3jI,5119
312
313
  streamlit/runtime/state/widgets.py,sha256=dgPawgm1QC_OgH12xWWZ0I1sOvZFx8HrtRW3xwT5qPk,10975
313
- streamlit/static/asset-manifest.json,sha256=PTrwfhXJWBf2mrC2prXqC_Xxvtt6Qbmy0iW_cvDxWjA,14227
314
+ streamlit/static/asset-manifest.json,sha256=y4nIELdhBB805iKYQPB9vihW_dCxmgt2zTpo29gU45U,14227
314
315
  streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
315
- streamlit/static/index.html,sha256=GBoagmPd2ISnAZtrffXNq88ZL7rsXw_FzcRAIOveefE,891
316
+ streamlit/static/index.html,sha256=yuKLY76aZuRlDbTsloGRLXdGUFuGUMo2BYhsMmDtP4U,891
316
317
  streamlit/static/static/css/2411.8b8f33d6.chunk.css,sha256=4m2lbj1eVFXSaGCRBHZNhqyRz-4Ce9KogjJPxIq6On8,33275
317
318
  streamlit/static/static/css/43.e3b876c5.chunk.css,sha256=XExLUUHInaWJp_m8TtBWhQ88SUuxZl6Jnnw5NA6rwI4,2633
318
319
  streamlit/static/static/css/6692.65519639.chunk.css,sha256=7yVN3jCqR9w3ighikXanguy3-zs13V_poJHvLT7ojUU,11095
@@ -322,7 +323,7 @@ streamlit/static/static/js/1074.161eb70d.chunk.js,sha256=pn1FbFrRgoyLDnpgYZZ0a-7
322
323
  streamlit/static/static/js/1168.d5c307a0.chunk.js,sha256=5Ys4Vn5IxhKrdwp8Q1F5OhvzY8FOTsTCjl1As9mrtv4,6473
323
324
  streamlit/static/static/js/1307.8ea033f1.chunk.js,sha256=1RsYHRF-URzLz2ZsTxxbosYFhAaFmV_SklhAXb0zWd4,1524
324
325
  streamlit/static/static/js/1451.e3be1711.chunk.js,sha256=GRYNWlnXrMdd1zdgkSI8PUt5r7swAyLr1klE1ThHE8Y,5005
325
- streamlit/static/static/js/178.9aed59c0.chunk.js,sha256=k7ePzXdMy36W8mXbdId3JP3ePdTwIolA-PJdIFkeaEY,1024
326
+ streamlit/static/static/js/178.2203b5c2.chunk.js,sha256=kxmW2G74_iMKo-Dg6WbP141oliU7Iq9klostuKUsPs4,1217
326
327
  streamlit/static/static/js/1792.16c16498.chunk.js,sha256=ugkpIuQPKezP0y9WEr2sbmWnJQg-xYNhjzpo-aowrDg,725
327
328
  streamlit/static/static/js/2187.9469f035.chunk.js,sha256=sfHKNps1wTMCQpY-TlOVHeSItUl-UG3P4gOIs015d2E,32468
328
329
  streamlit/static/static/js/2411.714d213e.chunk.js,sha256=NsrUtjQ4kGsQvTK7S5yOmzjckq8G1MOMBwPMOr-Yvzw,2091159
@@ -379,8 +380,8 @@ streamlit/static/static/js/9330.c0dd1723.chunk.js,sha256=GhnPu6wiRJ-Lf8CAPKlEbAk
379
380
  streamlit/static/static/js/9336.2d95d840.chunk.js,sha256=6nGdXfPdjgSauDXzdPVqijnQB2ErTgkzwfoinHGt484,13482
380
381
  streamlit/static/static/js/9656.8c935274.chunk.js,sha256=3VB6NT0EQErJUX2SYLQpmNAp19sWI45AbNOQLVjcvII,22113
381
382
  streamlit/static/static/js/9758.6e6d8662.chunk.js,sha256=3Gtwgkru2xQTl1mCxFjILQ_Ppb8DMKySHY5YVhm9ihY,2119
382
- streamlit/static/static/js/main.c1c90505.js,sha256=nFXWWvJe8uy8RileI_wzZ_HTzOBDjfjofOTQEpZPnCY,4368743
383
- streamlit/static/static/js/main.c1c90505.js.LICENSE.txt,sha256=YTeqT7R6idssTgnyi3gf0tRiq18-LiPeDOpsWcnbi34,3184
383
+ streamlit/static/static/js/main.7f946e0f.js,sha256=DglJFeYXJ6_wQi7cm1kDowJtWzOu8xUXTdkV_JNM830,4371416
384
+ streamlit/static/static/js/main.7f946e0f.js.LICENSE.txt,sha256=YTeqT7R6idssTgnyi3gf0tRiq18-LiPeDOpsWcnbi34,3184
384
385
  streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
385
386
  streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
386
387
  streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
@@ -473,8 +474,8 @@ streamlit/static/static/media/logo.83ae4f2fb87e38be7cbb8a5d2beb64d2.svg,sha256=_
473
474
  streamlit/static/static/media/rocket.b75b17d2b0a063c6cea230d1a9d77f1e.svg,sha256=6ZIRbOQuBNsdJnpfrNMq-6mYpYDN8qJGVsxkZIn8bP8,39315
474
475
  streamlit/testing/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
475
476
  streamlit/testing/v1/__init__.py,sha256=XGxNOq4VfmwlVj9K6vXB8dAH1YbI_8AIsvw_vbzQoNA,690
476
- streamlit/testing/v1/app_test.py,sha256=CE_BcAhcdR7QaL6lI00_WrIzqxGo9HT_XySbWoKd1xM,34187
477
- streamlit/testing/v1/element_tree.py,sha256=PxVskkUEoRQqBUO8EDe9owdm7uyePBCr36Gq_8X8OrE,57730
477
+ streamlit/testing/v1/app_test.py,sha256=-XuZXviLYPDTEwBV4s8kmZl77s-XEegSzYTT1D2WRXA,35175
478
+ streamlit/testing/v1/element_tree.py,sha256=PqcK4w_6qSkahavyz_iCWtbXJxtU3SJbqqE029S6dus,59452
478
479
  streamlit/testing/v1/local_script_runner.py,sha256=oa00hdDCB0pjVwBR4XGNNxAnOW4YuQCF29lwcHsvTDM,6329
479
480
  streamlit/testing/v1/util.py,sha256=IwxXIlGsVNtC1RmtmgdeBHmJYPjK0wiqNL4HMW6IJZI,1791
480
481
  streamlit/vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -503,9 +504,9 @@ streamlit/web/server/server_util.py,sha256=FptUF-CjFh78VjeTQDi3R78m7E64MDe3wcklg
503
504
  streamlit/web/server/stats_request_handler.py,sha256=cL__KbJFIhdhf1Zt6skbLehUqT-jo56x1HARxogZDOI,3680
504
505
  streamlit/web/server/upload_file_request_handler.py,sha256=YPDmKWUnaGH9d4QNcMEsY5k1YIz_q-xW1K5fmgHaDzc,4966
505
506
  streamlit/web/server/websocket_headers.py,sha256=07SkWLcOxbyldl7UcBzrMKY9ZojypCQACiKoh5FcH7Y,1870
506
- streamlit_nightly-1.31.2.dev20240221.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
507
- streamlit_nightly-1.31.2.dev20240221.dist-info/METADATA,sha256=kw1zdzc-CBsaRjLqIPtdVc17NqYSWiHt2CDK0Wy97Ns,8528
508
- streamlit_nightly-1.31.2.dev20240221.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
509
- streamlit_nightly-1.31.2.dev20240221.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
510
- streamlit_nightly-1.31.2.dev20240221.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
511
- streamlit_nightly-1.31.2.dev20240221.dist-info/RECORD,,
507
+ streamlit_nightly-1.31.2.dev20240223.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
508
+ streamlit_nightly-1.31.2.dev20240223.dist-info/METADATA,sha256=3_ZZRRTg04JT_Bk-c7hoiek5uY9wsTiakkfsYejg1Kk,8528
509
+ streamlit_nightly-1.31.2.dev20240223.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
510
+ streamlit_nightly-1.31.2.dev20240223.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
511
+ streamlit_nightly-1.31.2.dev20240223.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
512
+ streamlit_nightly-1.31.2.dev20240223.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var a=r(66845),s=r(16295),n=r(40864);const i=528;function c(e){let{element:t,width:r,endpoints:c}=e;const d=(0,a.useRef)(null),{type:l,url:o,startTime:u}=t;(0,a.useEffect)((()=>{d.current&&(d.current.currentTime=u)}),[u]),(0,a.useEffect)((()=>{const e=d.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]);const m=e=>{const{startTime:r}=t;return r?"".concat(e,"?start=").concat(r):e};if(l===s.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:i;return(0,n.jsx)("iframe",{"data-testid":"stVideo",title:o,src:m(o),width:r,height:e,style:{colorScheme:"light dark"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,n.jsx)("video",{"data-testid":"stVideo",ref:d,controls:!0,src:c.buildMediaURL(o),className:"stVideo",style:{width:r,height:0===r?i:void 0}})}}}]);