streamlit-nightly 1.45.1.dev20250507__py3-none-any.whl → 1.45.1.dev20250508__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.
- streamlit/config.py +75 -39
- streamlit/config_util.py +20 -12
- streamlit/elements/deck_gl_json_chart.py +30 -17
- streamlit/elements/map.py +20 -15
- streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.BgsGCsV4.js → ErrorOutline.esm.C9UoaGEN.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CCKezPn5.js → FileDownload.esm.DoToR9q0.js} +1 -1
- streamlit/static/static/js/{FileHelper.CprSF_kT.js → FileHelper.Bt4VJ--Q.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DiwQ0EtT.js → FormClearHelper.D5PbW8FI.js} +1 -1
- streamlit/static/static/js/{Hooks.DDqhyZ1_.js → Hooks.DgkQ2Xp9.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BCEZxme4.js → InputInstructions.DLnLhwHI.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CGdY94g_.js → ProgressBar.BtSgh_K-.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.uGJp_Q0v.js → RenderInPortalIfExists.CjdyBvQX.js} +1 -1
- streamlit/static/static/js/{Toolbar.hTlw0-K1.js → Toolbar.CAYIzVZk.js} +1 -1
- streamlit/static/static/js/{index.xsH4HHeE.js → UploadFileInfo.0DCkpDDf.js} +5 -5
- streamlit/static/static/js/{base-input.mGTY3-qU.js → base-input.CD4xW4_9.js} +4 -4
- streamlit/static/static/js/{checkbox.Cg-5cKAh.js → checkbox.Ba4jj5dR.js} +2 -2
- streamlit/static/static/js/{createSuper.-HPb1oYT.js → createSuper.BBGT9Ijd.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BpNYxiTp.js → data-grid-overlay-editor.CYuk1Aj7.js} +1 -1
- streamlit/static/static/js/{downloader.DS9891pS.js → downloader.DM9KEOCw.js} +1 -1
- streamlit/static/static/js/{es6.CU1PEL2w.js → es6.FqM62T4b.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CgJE2bJN.js → iframeResizer.contentWindow.s2B09mw2.js} +1 -1
- streamlit/static/static/js/{index.DPJBu2uZ.js → index.0pkoyBcb.js} +1 -1
- streamlit/static/static/js/{index.BC0ueJ8H.js → index.B9FiDQ3U.js} +1 -1
- streamlit/static/static/js/{index.Dh4RKl-F.js → index.BDTYk2an.js} +1 -1
- streamlit/static/static/js/{index.CtoDsUtq.js → index.BFqpCk2P.js} +1 -1
- streamlit/static/static/js/{index.DWV80Vyw.js → index.BMXmhMlZ.js} +1 -1
- streamlit/static/static/js/{index.CzGUd4IN.js → index.BVA8TXNT.js} +1 -1
- streamlit/static/static/js/{index.DtqvdV-p.js → index.BY7-qCf5.js} +1 -1
- streamlit/static/static/js/{index.GSYBrzVp.js → index.BoMRR3tN.js} +1 -1
- streamlit/static/static/js/index.BsjuUMyW.js +1 -0
- streamlit/static/static/js/{index.DZ6oX-v9.js → index.C2qCX1Lh.js} +74 -74
- streamlit/static/static/js/{index.CJPcdxPe.js → index.CCD4LJ9Q.js} +1 -1
- streamlit/static/static/js/{index.CN91oQMB.js → index.CEKMSkSh.js} +5 -5
- streamlit/static/static/js/{index.BHVQ94t4.js → index.CH9XN_-G.js} +1 -1
- streamlit/static/static/js/{index.BT0p7gAu.js → index.CP2PmB93.js} +1 -1
- streamlit/static/static/js/{index.fLsU9uCJ.js → index.CbLZDRQu.js} +1 -1
- streamlit/static/static/js/index.CeiCniCg.js +1 -0
- streamlit/static/static/js/index.CpDFZQ4Y.js +1 -0
- streamlit/static/static/js/{index.CvFsF3FD.js → index.CqaahZPf.js} +1 -1
- streamlit/static/static/js/{index.BTTj6ld4.js → index.Cwtbhfaf.js} +1 -1
- streamlit/static/static/js/{index.Bb-Ukg41.js → index.CyE1OdOj.js} +1 -1
- streamlit/static/static/js/{index.ErkF0SoX.js → index.D9FvPPrI.js} +2 -2
- streamlit/static/static/js/index.D9qEk5xd.js +1 -0
- streamlit/static/static/js/{index.B209tswL.js → index.DG8IxVeM.js} +256 -256
- streamlit/static/static/js/{index.DLTqo4pp.js → index.DMrO9G6A.js} +3 -3
- streamlit/static/static/js/{index.DJHUlWgy.js → index.DQi04JYE.js} +1 -1
- streamlit/static/static/js/{index.UTlCdasa.js → index.DSDkXosb.js} +2 -2
- streamlit/static/static/js/index.DTXSsTgK.js +1 -0
- streamlit/static/static/js/{index.Bph6ZoI5.js → index.DTi8Lw0k.js} +1 -1
- streamlit/static/static/js/index.DWaB7Scf.js +1 -0
- streamlit/static/static/js/{index.CyGuL4If.js → index.DkGCnTMe.js} +2 -2
- streamlit/static/static/js/{index.CMOA-8Q2.js → index.DqVjOqxm.js} +1 -1
- streamlit/static/static/js/index.JTeVe9GQ.js +1 -0
- streamlit/static/static/js/{index.hPjr68pz.js → index.R0peMEpV.js} +1 -1
- streamlit/static/static/js/{index.PSwG8ayC.js → index.RHbaxsqm.js} +1 -1
- streamlit/static/static/js/index.T5LKPcND.js +1 -0
- streamlit/static/static/js/{index.DVpzZJNg.js → index.b9kK7Vzl.js} +1 -1
- streamlit/static/static/js/{index.BXYstdPh.js → index.hT9gkW3a.js} +2 -2
- streamlit/static/static/js/{input.DY17i94N.js → input.DMOGBelK.js} +2 -2
- streamlit/static/static/js/{memory.DsIIcbSd.js → memory.DmCktBGW.js} +1 -1
- streamlit/static/static/js/{mergeWith.cRgGdgvI.js → mergeWith.DeWTsJ5h.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.B8Xi2dYq.js → number-overlay-editor.DDFelcUP.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BgDi5nUm.js → possibleConstructorReturn.CYJtAqB-.js} +1 -1
- streamlit/static/static/js/{sandbox.BH9emp13.js → sandbox.CfaU9Ih9.js} +1 -1
- streamlit/static/static/js/{textarea.DAyShsGG.js → textarea.7hWYKDw2.js} +2 -2
- streamlit/static/static/js/{timepicker.CCH2R2Y0.js → timepicker.DZsgZ9oE.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CNffSDCu.js → toConsumableArray.CqWB4Jry.js} +1 -1
- streamlit/static/static/js/{uniqueId.B49CstkV.js → uniqueId.DQ533D9O.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CkThOkF9.js → useBasicWidgetState.-99xbU_o.js} +1 -1
- streamlit/static/static/js/useOnInputChange.B4G2Q7Bu.js +1 -0
- streamlit/static/static/js/{withFullScreenWrapper.UsvF_Jwr.js → withFullScreenWrapper.BJQZ2aNc.js} +1 -1
- streamlit/web/bootstrap.py +2 -1
- streamlit/web/server/oauth_authlib_routes.py +7 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250508.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250508.dist-info}/RECORD +81 -82
- streamlit/static/static/js/UploadFileInfo.C-jY39rj.js +0 -1
- streamlit/static/static/js/index.BVjgrQ4R.js +0 -1
- streamlit/static/static/js/index.BZ9mqzEJ.js +0 -1
- streamlit/static/static/js/index.BhTok8vt.js +0 -1
- streamlit/static/static/js/index.DAxf3_iz.js +0 -1
- streamlit/static/static/js/index.Dn76KVNf.js +0 -1
- streamlit/static/static/js/index.OngWTN39.js +0 -1
- streamlit/static/static/js/index.eR_vQpeg.js +0 -1
- streamlit/static/static/js/index.kXOZCC_6.js +0 -1
- streamlit/static/static/js/useOnInputChange.BqEq0xFZ.js +0 -1
- {streamlit_nightly-1.45.1.dev20250507.data → streamlit_nightly-1.45.1.dev20250508.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250508.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250508.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250508.dist-info}/top_level.txt +0 -0
streamlit/config.py
CHANGED
@@ -605,8 +605,9 @@ _create_option(
|
|
605
605
|
_create_option(
|
606
606
|
"runner.postScriptGC",
|
607
607
|
description="""
|
608
|
-
Run the Python Garbage Collector after each script execution.
|
609
|
-
|
608
|
+
Run the Python Garbage Collector after each script execution.
|
609
|
+
|
610
|
+
This can help avoid excess memory use in Streamlit apps, but could
|
610
611
|
introduce delay in rerunning the app script for high-memory-use
|
611
612
|
applications.
|
612
613
|
""",
|
@@ -618,11 +619,12 @@ _create_option(
|
|
618
619
|
_create_option(
|
619
620
|
"runner.fastReruns",
|
620
621
|
description="""
|
621
|
-
Handle script rerun requests immediately, rather than waiting for
|
622
|
-
execution to reach a yield point.
|
623
|
-
|
624
|
-
|
625
|
-
|
622
|
+
Handle script rerun requests immediately, rather than waiting for
|
623
|
+
script execution to reach a yield point.
|
624
|
+
|
625
|
+
This makes Streamlit much more responsive to user interaction, but it
|
626
|
+
can lead to race conditions in apps that mutate session_state data
|
627
|
+
outside of explicit session_state assignment statements.
|
626
628
|
""",
|
627
629
|
default_val=True,
|
628
630
|
type_=bool,
|
@@ -632,6 +634,7 @@ _create_option(
|
|
632
634
|
"runner.enforceSerializableSessionState",
|
633
635
|
description="""
|
634
636
|
Raise an exception after adding unserializable data to Session State.
|
637
|
+
|
635
638
|
Some execution environments may require serializing all data in Session
|
636
639
|
State, so it may be useful to detect incompatibility during development,
|
637
640
|
or when the execution environment will stop supporting it in the future.
|
@@ -644,8 +647,10 @@ _create_option(
|
|
644
647
|
"runner.enumCoercion",
|
645
648
|
description="""
|
646
649
|
Adjust how certain 'options' widgets like radio, selectbox, and
|
647
|
-
multiselect coerce Enum members
|
648
|
-
|
650
|
+
multiselect coerce Enum members.
|
651
|
+
|
652
|
+
This is useful when the Enum class gets re-defined during a script
|
653
|
+
re-run. For more information, check out the docs:
|
649
654
|
https://docs.streamlit.io/develop/concepts/design/custom-classes#enums
|
650
655
|
|
651
656
|
Allowed values:
|
@@ -759,7 +764,9 @@ _create_option(
|
|
759
764
|
@_create_option("server.address")
|
760
765
|
def _server_address() -> str | None:
|
761
766
|
"""The address where the server will listen for client and browser
|
762
|
-
connections.
|
767
|
+
connections.
|
768
|
+
|
769
|
+
Use this if you want to bind the server to a specific address.
|
763
770
|
If set, the server will only be accessible from this address, and not from
|
764
771
|
any aliases (like localhost).
|
765
772
|
|
@@ -887,9 +894,11 @@ _create_option(
|
|
887
894
|
_create_option(
|
888
895
|
"server.disconnectedSessionTTL",
|
889
896
|
description="""
|
890
|
-
TTL in seconds for sessions whose websockets have been disconnected.
|
891
|
-
|
892
|
-
|
897
|
+
TTL in seconds for sessions whose websockets have been disconnected.
|
898
|
+
|
899
|
+
The server may choose to clean up session state, uploaded files, etc
|
900
|
+
for a given session with no active websocket connection at any point
|
901
|
+
after this time has passed.
|
893
902
|
""",
|
894
903
|
default_val=120,
|
895
904
|
type_=int,
|
@@ -999,13 +1008,17 @@ _create_section("mapbox", "Mapbox configuration that is being used by DeckGL.")
|
|
999
1008
|
_create_option(
|
1000
1009
|
"mapbox.token",
|
1001
1010
|
description="""
|
1002
|
-
|
1003
|
-
|
1004
|
-
To get a token for yourself, create an account at
|
1005
|
-
https://mapbox.com. It's free (for moderate usage levels)!
|
1011
|
+
If you'd like to show maps using Mapbox rather than Carto, use this
|
1012
|
+
to pass the Mapbox API token.
|
1006
1013
|
""",
|
1007
1014
|
default_val="",
|
1008
1015
|
sensitive=True,
|
1016
|
+
deprecated=True,
|
1017
|
+
deprecation_text="""
|
1018
|
+
Instead of this, you should use either the MAPBOX_API_KEY environment
|
1019
|
+
variable or PyDeck's `api_keys` argument.
|
1020
|
+
""",
|
1021
|
+
expiration_date="2026-05-01",
|
1009
1022
|
)
|
1010
1023
|
|
1011
1024
|
|
@@ -1055,6 +1068,7 @@ _create_theme_options(
|
|
1055
1068
|
categories=["theme"],
|
1056
1069
|
description="""
|
1057
1070
|
The preset Streamlit theme that your custom theme inherits from.
|
1071
|
+
|
1058
1072
|
This can be one of the following: "light" or "dark".
|
1059
1073
|
""",
|
1060
1074
|
)
|
@@ -1113,14 +1127,17 @@ _create_theme_options(
|
|
1113
1127
|
description="""
|
1114
1128
|
The font family for all text, except code blocks. This can be one of
|
1115
1129
|
the following:
|
1130
|
+
|
1116
1131
|
- "sans-serif"
|
1117
1132
|
- "serif"
|
1118
1133
|
- "monospace"
|
1119
1134
|
- the `font` value for a custom font table under [[theme.fontFaces]]
|
1120
1135
|
- a comma-separated list of these (as a single string) to specify
|
1121
1136
|
fallbacks
|
1137
|
+
|
1122
1138
|
For example, you can use the following:
|
1123
|
-
|
1139
|
+
|
1140
|
+
font = "cool-font, fallback-cool-font, sans-serif"
|
1124
1141
|
""",
|
1125
1142
|
)
|
1126
1143
|
|
@@ -1130,6 +1147,7 @@ _create_theme_options(
|
|
1130
1147
|
description="""
|
1131
1148
|
The font family to use for code (monospace) in the sidebar. This can be
|
1132
1149
|
one of the following:
|
1150
|
+
|
1133
1151
|
- "sans-serif"
|
1134
1152
|
- "serif"
|
1135
1153
|
- "monospace"
|
@@ -1144,12 +1162,14 @@ _create_theme_options(
|
|
1144
1162
|
categories=["theme", CustomThemeCategories.SIDEBAR],
|
1145
1163
|
description="""
|
1146
1164
|
The font family to use for headings. This can be one of the following:
|
1165
|
+
|
1147
1166
|
- "sans-serif"
|
1148
1167
|
- "serif"
|
1149
1168
|
- "monospace"
|
1150
1169
|
- the `font` value for a custom font table under [[theme.fontFaces]]
|
1151
1170
|
- a comma-separated list of these (as a single string) to specify
|
1152
1171
|
fallbacks
|
1172
|
+
|
1153
1173
|
If no heading font is set, Streamlit uses `theme.font` for headings.
|
1154
1174
|
""",
|
1155
1175
|
)
|
@@ -1158,19 +1178,24 @@ _create_theme_options(
|
|
1158
1178
|
"fontFaces",
|
1159
1179
|
categories=["theme"],
|
1160
1180
|
description="""
|
1161
|
-
An array of fonts to use in your app.
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1181
|
+
An array of fonts to use in your app.
|
1182
|
+
|
1183
|
+
Each font in the array is a table (dictionary) with the following three
|
1184
|
+
attributes: font, url, weight, and style.
|
1185
|
+
|
1186
|
+
To host a font with your app, enable static file serving with
|
1187
|
+
`server.enableStaticServing=true`.
|
1188
|
+
|
1189
|
+
You can define multiple [[theme.fontFaces]] tables.
|
1166
1190
|
|
1167
1191
|
For example, each font is defined in a [[theme.fontFaces]] table as
|
1168
1192
|
follows:
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1193
|
+
|
1194
|
+
[[theme.fontFaces]]
|
1195
|
+
font = "font_name"
|
1196
|
+
url = "app/static/font_file.woff"
|
1197
|
+
weight = 400
|
1198
|
+
style = "normal"
|
1174
1199
|
""",
|
1175
1200
|
)
|
1176
1201
|
|
@@ -1178,11 +1203,17 @@ _create_theme_options(
|
|
1178
1203
|
"baseRadius",
|
1179
1204
|
categories=["theme", CustomThemeCategories.SIDEBAR],
|
1180
1205
|
description="""
|
1181
|
-
The radius used as basis for the corners of most UI elements.
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1206
|
+
The radius used as basis for the corners of most UI elements.
|
1207
|
+
|
1208
|
+
This can be one of the following:
|
1209
|
+
- "none"
|
1210
|
+
- "small"
|
1211
|
+
- "medium"
|
1212
|
+
- "large"
|
1213
|
+
- "full"
|
1214
|
+
- ...or the number in pixels or rem. For example, you can use "10px",
|
1215
|
+
"0.5rem", or "2rem". To follow best practices, use rem instead of
|
1216
|
+
pixels when specifying a numeric size.
|
1186
1217
|
""",
|
1187
1218
|
)
|
1188
1219
|
|
@@ -1207,8 +1238,11 @@ _create_theme_options(
|
|
1207
1238
|
"baseFontSize",
|
1208
1239
|
categories=["theme"],
|
1209
1240
|
description="""
|
1210
|
-
Sets the root font size (in pixels) for the app
|
1211
|
-
|
1241
|
+
Sets the root font size (in pixels) for the app.
|
1242
|
+
|
1243
|
+
This determines the overall scale of text and UI elements.
|
1244
|
+
|
1245
|
+
When unset, the font size will be 16px.
|
1212
1246
|
""",
|
1213
1247
|
type_=int,
|
1214
1248
|
)
|
@@ -1230,10 +1264,12 @@ _create_section("secrets", "Secrets configuration.")
|
|
1230
1264
|
_create_option(
|
1231
1265
|
"secrets.files",
|
1232
1266
|
description="""
|
1233
|
-
List of locations where secrets are searched.
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1267
|
+
List of locations where secrets are searched.
|
1268
|
+
|
1269
|
+
An entry can be a path to a TOML file or directory path where
|
1270
|
+
Kubernetes style secrets are saved. Order is important, import is
|
1271
|
+
first to last, so secrets in later files will take precedence over
|
1272
|
+
earlier ones.
|
1237
1273
|
""",
|
1238
1274
|
default_val=[
|
1239
1275
|
# NOTE: The order here is important! Project-level secrets should overwrite
|
streamlit/config_util.py
CHANGED
@@ -112,7 +112,22 @@ def show_config(
|
|
112
112
|
|
113
113
|
# # Add a line break after a paragraph only if it's not the last paragraph
|
114
114
|
if i != last_paragraph_idx:
|
115
|
-
|
115
|
+
append_comment("")
|
116
|
+
|
117
|
+
if option.deprecated:
|
118
|
+
if out[-1] != "#":
|
119
|
+
append_comment("")
|
120
|
+
append_comment(
|
121
|
+
cli_util.style_for_cli("THIS IS DEPRECATED.", fg="yellow")
|
122
|
+
)
|
123
|
+
append_comment("")
|
124
|
+
for line in _clean_paragraphs(option.deprecation_text):
|
125
|
+
append_comment(line)
|
126
|
+
append_comment("")
|
127
|
+
append_comment(
|
128
|
+
"This option will be removed on or after %s."
|
129
|
+
% option.expiration_date
|
130
|
+
)
|
116
131
|
|
117
132
|
import toml
|
118
133
|
|
@@ -121,28 +136,21 @@ def show_config(
|
|
121
136
|
|
122
137
|
if len(toml_default) > 0:
|
123
138
|
# Ensure a line break before appending "Default" comment, if not already there
|
124
|
-
if out[-1] != "":
|
125
|
-
|
139
|
+
if out[-1] != "#":
|
140
|
+
append_comment("")
|
126
141
|
append_comment("Default: %s" % toml_default)
|
127
142
|
else:
|
128
143
|
# Don't say "Default: (unset)" here because this branch applies
|
129
144
|
# to complex config settings too.
|
130
145
|
pass
|
131
146
|
|
132
|
-
if option.deprecated:
|
133
|
-
append_comment(cli_util.style_for_cli("DEPRECATED.", fg="yellow"))
|
134
|
-
for line in _clean_paragraphs(option.deprecation_text):
|
135
|
-
append_comment(line)
|
136
|
-
append_comment(
|
137
|
-
"This option will be removed on or after %s."
|
138
|
-
% option.expiration_date
|
139
|
-
)
|
140
|
-
|
141
147
|
option_is_manually_set = (
|
142
148
|
option.where_defined != ConfigOption.DEFAULT_DEFINITION
|
143
149
|
)
|
144
150
|
|
145
151
|
if option_is_manually_set:
|
152
|
+
if out[-1] != "# ":
|
153
|
+
append_comment("")
|
146
154
|
append_comment("The value below was set in %s" % option.where_defined)
|
147
155
|
|
148
156
|
toml_setting = toml.dumps({key: option.value})
|
@@ -269,7 +269,8 @@ class PydeckMixin:
|
|
269
269
|
selection_mode: Literal[
|
270
270
|
"single-object"
|
271
271
|
], # Selection mode will only be activated by on_select param; default value here to make it work with mypy
|
272
|
-
|
272
|
+
# No default value here to make it work with mypy
|
273
|
+
on_select: Literal["ignore"],
|
273
274
|
key: Key | None = None,
|
274
275
|
) -> DeltaGenerator: ...
|
275
276
|
|
@@ -308,21 +309,26 @@ class PydeckMixin:
|
|
308
309
|
- DeckGL docs: https://github.com/uber/deck.gl/tree/master/docs
|
309
310
|
- DeckGL JSON docs: https://github.com/uber/deck.gl/tree/master/modules/json
|
310
311
|
|
311
|
-
When using this command,
|
312
|
-
content.
|
313
|
-
|
314
|
-
or
|
312
|
+
When using this command, a service called Carto_ provides the map tiles to render
|
313
|
+
map content. If you're using advanced PyDeck features you may need to obtain
|
314
|
+
an API key from Carto first. You can do that as
|
315
|
+
``pydeck.Deck(api_keys={"carto": YOUR_KEY})`` or by setting the CARTO_API_KEY
|
316
|
+
environment variable. See `PyDeck's documentation`_ for more information.
|
315
317
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
use of Mapbox is governed by Mapbox's Terms of Use.
|
318
|
+
Another common provider for map tiles is Mapbox_. If you prefer to use that,
|
319
|
+
you'll need to create an account at https://mapbox.com and specify your Mapbox
|
320
|
+
key when creating the ``pydeck.Deck`` object. You can do that as
|
321
|
+
``pydeck.Deck(api_keys={"mapbox": YOUR_KEY})`` or by setting the MAPBOX_API_KEY
|
322
|
+
environment variable.
|
322
323
|
|
323
|
-
|
324
|
-
|
325
|
-
https://
|
324
|
+
.. _Carto: https://carto.com
|
325
|
+
.. _Mapbox: https://mapbox.com
|
326
|
+
.. _PyDeck's documentation: https://deckgl.readthedocs.io/en/latest/deck.html
|
327
|
+
|
328
|
+
Carto and Mapbox are third-party products and Streamlit accepts no responsibility
|
329
|
+
or liability of any kind for Carto or Mapbox, or for any content or information
|
330
|
+
made available by Carto or Mapbox. The use of Carto or Mapbox is governed by
|
331
|
+
their respective Terms of Use.
|
326
332
|
|
327
333
|
Parameters
|
328
334
|
----------
|
@@ -408,7 +414,7 @@ class PydeckMixin:
|
|
408
414
|
>>>
|
409
415
|
>>> st.pydeck_chart(
|
410
416
|
... pdk.Deck(
|
411
|
-
... map_style=None,
|
417
|
+
... map_style=None, # Use Streamlit theme to pick map style
|
412
418
|
... initial_view_state=pdk.ViewState(
|
413
419
|
... latitude=37.76,
|
414
420
|
... longitude=-122.4,
|
@@ -467,7 +473,13 @@ class PydeckMixin:
|
|
467
473
|
if tooltip:
|
468
474
|
pydeck_proto.tooltip = json.dumps(tooltip)
|
469
475
|
|
470
|
-
|
476
|
+
# Get the Mapbox key from the PyDeck object first, and then fallback to the
|
477
|
+
# old mapbox.token config option.
|
478
|
+
|
479
|
+
mapbox_token = getattr(pydeck_obj, "mapbox_key", None)
|
480
|
+
if mapbox_token is None or mapbox_token == "":
|
481
|
+
mapbox_token = config.get_option("mapbox.token")
|
482
|
+
|
471
483
|
if mapbox_token:
|
472
484
|
pydeck_proto.mapbox_token = mapbox_token
|
473
485
|
|
@@ -476,7 +488,8 @@ class PydeckMixin:
|
|
476
488
|
|
477
489
|
if on_select not in ["ignore", "rerun"] and not callable(on_select):
|
478
490
|
raise StreamlitAPIException(
|
479
|
-
f"You have passed {on_select} to `on_select`.
|
491
|
+
f"You have passed {on_select} to `on_select`. "
|
492
|
+
"But only 'ignore', 'rerun', or a callable is supported."
|
480
493
|
)
|
481
494
|
|
482
495
|
if is_selection_activated:
|
streamlit/elements/map.py
CHANGED
@@ -94,21 +94,26 @@ class MapMixin:
|
|
94
94
|
This is a wrapper around ``st.pydeck_chart`` to quickly create
|
95
95
|
scatterplot charts on top of a map, with auto-centering and auto-zoom.
|
96
96
|
|
97
|
-
When using this command,
|
98
|
-
content.
|
99
|
-
|
100
|
-
or
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
https://
|
97
|
+
When using this command, a service called Carto_ provides the map tiles to render
|
98
|
+
map content. If you're using advanced PyDeck features you may need to obtain
|
99
|
+
an API key from Carto first. You can do that as
|
100
|
+
``pydeck.Deck(api_keys={"carto": YOUR_KEY})`` or by setting the CARTO_API_KEY
|
101
|
+
environment variable. See `PyDeck's documentation`_ for more information.
|
102
|
+
|
103
|
+
Another common provider for map tiles is Mapbox_. If you prefer to use that,
|
104
|
+
you'll need to create an account at https://mapbox.com and specify your Mapbox
|
105
|
+
key when creating the ``pydeck.Deck`` object. You can do that as
|
106
|
+
``pydeck.Deck(api_keys={"mapbox": YOUR_KEY})`` or by setting the MAPBOX_API_KEY
|
107
|
+
environment variable.
|
108
|
+
|
109
|
+
.. _Carto: https://carto.com
|
110
|
+
.. _Mapbox: https://mapbox.com
|
111
|
+
.. _PyDeck's documentation: https://deckgl.readthedocs.io/en/latest/deck.html
|
112
|
+
|
113
|
+
Carto and Mapbox are third-party products and Streamlit accepts no responsibility
|
114
|
+
or liability of any kind for Carto or Mapbox, or for any content or information
|
115
|
+
made available by Carto or Mapbox. The use of Carto or Mapbox is governed by
|
116
|
+
their respective Terms of Use.
|
112
117
|
|
113
118
|
Parameters
|
114
119
|
----------
|
@@ -73,7 +73,7 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
73
73
|
id: builtins.str
|
74
74
|
"""ID, required for selection events."""
|
75
75
|
mapbox_token: builtins.str
|
76
|
-
"""The
|
76
|
+
"""The Mapbox token, if any."""
|
77
77
|
width: builtins.int
|
78
78
|
"""Width in pixels"""
|
79
79
|
height: builtins.int
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.C2qCX1Lh.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as a,_ as n}from"./index.
|
1
|
+
import{r,E as a,_ as n}from"./index.C2qCX1Lh.js";var i=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(a,n({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),r.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});i.displayName="ErrorOutline";export{i as E};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.C2qCX1Lh.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|