solara-ui 1.55.1__py3-none-any.whl → 1.56.0__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.
- solara/__init__.py +1 -1
- solara/components/file_download.py +15 -4
- solara/server/server.py +1 -0
- solara/server/settings.py +1 -0
- solara/server/static/solara_bootstrap.py +1 -1
- solara/server/templates/solara.html.j2 +4 -1
- {solara_ui-1.55.1.dist-info → solara_ui-1.56.0.dist-info}/METADATA +2 -4
- {solara_ui-1.55.1.dist-info → solara_ui-1.56.0.dist-info}/RECORD +12 -12
- {solara_ui-1.55.1.data → solara_ui-1.56.0.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara_ui-1.55.1.data → solara_ui-1.56.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara_ui-1.55.1.dist-info → solara_ui-1.56.0.dist-info}/WHEEL +0 -0
- {solara_ui-1.55.1.dist-info → solara_ui-1.56.0.dist-info}/licenses/LICENSE +0 -0
solara/__init__.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
from pathlib import Path
|
|
2
|
-
from typing import BinaryIO, Callable, List, Optional, Union, cast
|
|
3
|
+
from typing import Any, BinaryIO, Callable, Coroutine, List, Optional, Union, cast
|
|
3
4
|
|
|
4
5
|
import ipyvuetify as vy
|
|
5
6
|
import ipywidgets as widgets
|
|
@@ -19,7 +20,13 @@ class FileDownloadWidget(vy.VuetifyTemplate):
|
|
|
19
20
|
|
|
20
21
|
@solara.component
|
|
21
22
|
def FileDownload(
|
|
22
|
-
data: Union[
|
|
23
|
+
data: Union[
|
|
24
|
+
str,
|
|
25
|
+
bytes,
|
|
26
|
+
BinaryIO,
|
|
27
|
+
Callable[[], Union[str, bytes, BinaryIO]],
|
|
28
|
+
Callable[[], Coroutine[Any, Any, Union[str, bytes, BinaryIO]]],
|
|
29
|
+
],
|
|
23
30
|
filename: Optional[str] = None,
|
|
24
31
|
label: Optional[str] = None,
|
|
25
32
|
icon_name: Optional[str] = "mdi-cloud-download-outline",
|
|
@@ -130,7 +137,7 @@ def FileDownload(
|
|
|
130
137
|
|
|
131
138
|
## Arguments
|
|
132
139
|
|
|
133
|
-
* `data`: The data to download. Can be a string, bytes, or a file like object, or a function that returns one of these.
|
|
140
|
+
* `data`: The data to download. Can be a string, bytes, or a file like object, or a function (or coroutine function) that returns one of these.
|
|
134
141
|
* `filename`: The name of the file the user will see as default when downloading (default name is "solara-download.dat").
|
|
135
142
|
If a file object is provided, the filename will be extracted from the file object if possible.
|
|
136
143
|
* `label`: The label of the button. If not provided, the label will be "Download: {filename}".
|
|
@@ -162,7 +169,11 @@ def FileDownload(
|
|
|
162
169
|
def get_data() -> Optional[bytes]:
|
|
163
170
|
if request_download:
|
|
164
171
|
if callable(data):
|
|
165
|
-
|
|
172
|
+
# if it is a coroutine, we start a new event loop and run it
|
|
173
|
+
if asyncio.iscoroutinefunction(data):
|
|
174
|
+
data_non_lazy = asyncio.run(data())
|
|
175
|
+
else:
|
|
176
|
+
data_non_lazy = data()
|
|
166
177
|
else:
|
|
167
178
|
data_non_lazy = data
|
|
168
179
|
if hasattr(data_non_lazy, "read"):
|
solara/server/server.py
CHANGED
|
@@ -392,6 +392,7 @@ def read_root(
|
|
|
392
392
|
"path": path,
|
|
393
393
|
"root_path": root_path,
|
|
394
394
|
"jupyter_root_path": jupyter_root_path,
|
|
395
|
+
"force_refresh": settings.theme.force_refresh,
|
|
395
396
|
"resources": resources,
|
|
396
397
|
"theme": settings.theme.dict(),
|
|
397
398
|
"production": settings.main.mode == "production",
|
solara/server/settings.py
CHANGED
|
@@ -119,7 +119,7 @@ async def main():
|
|
|
119
119
|
]
|
|
120
120
|
for dep in requirements:
|
|
121
121
|
await micropip.install(dep, keep_going=True)
|
|
122
|
-
await micropip.install("/wheels/solara-1.
|
|
122
|
+
await micropip.install("/wheels/solara-1.56.0-py2.py3-none-any.whl", keep_going=True)
|
|
123
123
|
import solara
|
|
124
124
|
|
|
125
125
|
el = solara.Warning("lala")
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
solara.rootPath = {{ root_path | tojson | safe}};
|
|
246
246
|
solara.jupyterRootPath = {{ jupyter_root_path | tojson | safe}};
|
|
247
247
|
solara.cdn = {{ cdn | tojson | safe }};
|
|
248
|
+
solara.forceRefresh = {{ force_refresh | tojson | safe }};
|
|
248
249
|
// the vue templates expect it to not have a trailing slash
|
|
249
250
|
solara.cdn = solara.cdn.replace(/\/$/, '');
|
|
250
251
|
// keep this for backwards compatibility
|
|
@@ -364,7 +365,9 @@
|
|
|
364
365
|
}
|
|
365
366
|
},
|
|
366
367
|
needsRefresh: function (value) {
|
|
367
|
-
if
|
|
368
|
+
if(solara.forceRefresh) {
|
|
369
|
+
this.reload();
|
|
370
|
+
} else if (this.needsRefresh && !this.cancelAutoRefresh && !solara.production) {
|
|
368
371
|
console.log('value for needRefresh', value);
|
|
369
372
|
setTimeout(() => {
|
|
370
373
|
console.log('this.autoRefreshCount', this.autoRefreshCount)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: solara-ui
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.56.0
|
|
4
4
|
Dynamic: Summary
|
|
5
5
|
Project-URL: Home, https://www.github.com/widgetti/solara
|
|
6
6
|
Project-URL: Documentation, https://solara.dev
|
|
@@ -27,7 +27,7 @@ License: The MIT License (MIT)
|
|
|
27
27
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
28
|
THE SOFTWARE.
|
|
29
29
|
Classifier: License :: OSI Approved :: MIT License
|
|
30
|
-
Requires-Python: >=3.
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
31
|
Requires-Dist: humanize
|
|
32
32
|
Requires-Dist: ipyvue>=1.9.0
|
|
33
33
|
Requires-Dist: ipyvuetify>=1.6.10
|
|
@@ -40,7 +40,6 @@ Requires-Dist: markdown; extra == 'all'
|
|
|
40
40
|
Requires-Dist: numpy; extra == 'all'
|
|
41
41
|
Requires-Dist: pillow; extra == 'all'
|
|
42
42
|
Requires-Dist: pygments; extra == 'all'
|
|
43
|
-
Requires-Dist: pygments==2.10; (python_version < '3.7') and extra == 'all'
|
|
44
43
|
Requires-Dist: pymdown-extensions; extra == 'all'
|
|
45
44
|
Provides-Extra: cache
|
|
46
45
|
Requires-Dist: cachetools; extra == 'cache'
|
|
@@ -50,7 +49,6 @@ Requires-Dist: pillow; extra == 'extra'
|
|
|
50
49
|
Provides-Extra: markdown
|
|
51
50
|
Requires-Dist: markdown; extra == 'markdown'
|
|
52
51
|
Requires-Dist: pygments; extra == 'markdown'
|
|
53
|
-
Requires-Dist: pygments==2.10; (python_version < '3.7') and extra == 'markdown'
|
|
54
52
|
Requires-Dist: pymdown-extensions; extra == 'markdown'
|
|
55
53
|
Description-Content-Type: text/markdown
|
|
56
54
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
prefix/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
|
|
2
2
|
prefix/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
|
|
3
|
-
solara/__init__.py,sha256
|
|
3
|
+
solara/__init__.py,sha256=f3ilWC241PY1u14Y5jCFaV5jqnzXV2PMtNaMXOfpqdQ,3647
|
|
4
4
|
solara/__main__.py,sha256=J_f3D_mgiNicU_ay_I-qn08GOViSXm04Ym0mopqh2Os,24853
|
|
5
5
|
solara/_stores.py,sha256=N2Ec-61XNFXwigBx8f5QYPx7gDXenCOBdmLPXiJB45E,12320
|
|
6
6
|
solara/alias.py,sha256=9vfLzud77NP8in3OID9b5mmIO8NyrnFjN2_aE0lSb1k,216
|
|
@@ -44,7 +44,7 @@ solara/components/echarts.py,sha256=aAedLqKuVJnBi3FwhSdQIgAn-w55sNb_hGSmqkosfuA,
|
|
|
44
44
|
solara/components/echarts.vue,sha256=7TGmxaRUmH-LeH16jHiUzyuZgebGu_JDiWsa2DBSWW4,4056
|
|
45
45
|
solara/components/figure_altair.py,sha256=t4EEwXrdoisrbV5j2MS-HBlPc5HSFCK5r4mRXvYRH9w,1150
|
|
46
46
|
solara/components/file_browser.py,sha256=vd9BRENagoxxL-RtH5HheQm_0zFrnBiipjtNNvJkIdU,9762
|
|
47
|
-
solara/components/file_download.py,sha256=
|
|
47
|
+
solara/components/file_download.py,sha256=fnt6KqgGIVk1m_lwxURK82Cz3wMdxuVtTn3FOuv5p6M,7854
|
|
48
48
|
solara/components/file_drop.py,sha256=BA53EZsCzzPCS8i2ZH_S1NAkmmQlTOvNEoXAt0_1l4A,5239
|
|
49
49
|
solara/components/file_drop.vue,sha256=7V6YjHhoqOCVDMVPtObNwfHz2MdXLCFlNEqK1brl3zI,2243
|
|
50
50
|
solara/components/file_list_widget.vue,sha256=atp-FO9tBjvyCQ_32NqeB9Rcehg03vPLD1eIROgBDDU,1860
|
|
@@ -117,8 +117,8 @@ solara/server/kernel_context.py,sha256=nOgBgchZZmZpHpHtI6_JRpxgJApZ50eKVIOk_EnyX
|
|
|
117
117
|
solara/server/patch.py,sha256=KMoO3IK5sk-BWnwPNXhmGW4MGAgxGosgtUKMFf7oNm0,19902
|
|
118
118
|
solara/server/qt.py,sha256=QdMxX2T0Ol_j3QHYwInDyT5Gy4sOhYljMPYfru5kwLg,3774
|
|
119
119
|
solara/server/reload.py,sha256=BBH7QhrV1-e9RVyNE3uz1oPj1DagC3t_XSqGPNz0nJE,9747
|
|
120
|
-
solara/server/server.py,sha256=
|
|
121
|
-
solara/server/settings.py,sha256=
|
|
120
|
+
solara/server/server.py,sha256=zz-ht0RjtG6HqWApNqjZ4YHSSIKFiMYwPuOLEHrpMoY,17180
|
|
121
|
+
solara/server/settings.py,sha256=5Lzl5LvQuw1dejqAzYRUfgnuG-BeCi5f0EyVnq51BxU,7664
|
|
122
122
|
solara/server/shell.py,sha256=eLrpTAw3j_1pU-2S7_Jzd4xkoSs_CA7Nv7w0Q7IVLUM,9333
|
|
123
123
|
solara/server/starlette.py,sha256=gEBSJf-jZQ6Ep3HKIkcZNadpxgCp6VWdvlq67TjxJQ8,32934
|
|
124
124
|
solara/server/telemetry.py,sha256=GPKGA5kCIqJb76wgxQ2_U2uV_s0r-1tKqv-GVxo5hs8,6038
|
|
@@ -146,7 +146,7 @@ solara/server/static/highlight-dark.css,sha256=xO8-vta9vG4s1OfJNHXWqiLWzx_gM03jo
|
|
|
146
146
|
solara/server/static/highlight.css,sha256=k8ZdT5iwrGQ5tXTQHAXuxvZrSUq3kwCdEpy3mlFoZjs,2637
|
|
147
147
|
solara/server/static/main-vuetify.js,sha256=R3qM4xMlstMpRUdRaul78p34z_Av2ONSTXksg2V9TqQ,9503
|
|
148
148
|
solara/server/static/main.js,sha256=mcx4JNQ4Lg4pNdUIqMoZos1mZyYFS48yd_JNFFJUqIE,5679
|
|
149
|
-
solara/server/static/solara_bootstrap.py,sha256=
|
|
149
|
+
solara/server/static/solara_bootstrap.py,sha256=AIGeLAFLJdvpdCLUeDk9nrzWtwhv0AfwTbySQT60Zd0,3195
|
|
150
150
|
solara/server/static/sun.svg,sha256=jEKBAGCr7b9zNYv0VUb7lMWKjnU2dX69_Ye_DZWGXJI,6855
|
|
151
151
|
solara/server/static/webworker.js,sha256=cjAFz7-SygStHJnYlJUlJs-gE_7YQeQ-WBDcmKYyjvo,1372
|
|
152
152
|
solara/server/templates/index.html.j2,sha256=JXQo1M-STFHLBOFetgG7509cAq8xUP0VAEtYDzz35fY,31
|
|
@@ -155,7 +155,7 @@ solara/server/templates/loader-plain.html,sha256=VEtMDC8MQj75o2iWJ_gR70Jp05oOoyR
|
|
|
155
155
|
solara/server/templates/loader-solara.css,sha256=QerfzwlenkSJMq8uk_qEtoSdcI-DKMRrH9XXDEPsrUA,1670
|
|
156
156
|
solara/server/templates/loader-solara.html,sha256=wFPnTevFBcRXQj6ZCZdgkOGTMwAAiOmNlgFdzdJLpXA,2744
|
|
157
157
|
solara/server/templates/plain.html,sha256=yO1r2hidA3bxOclaxtI_vTZtdDTFn2KKeeoldJuinXk,2762
|
|
158
|
-
solara/server/templates/solara.html.j2,sha256=
|
|
158
|
+
solara/server/templates/solara.html.j2,sha256=dYVPXPWVs2Y8oBr5bJQ_yUDVrg7SzAJYUBcAMYdj2T8,22009
|
|
159
159
|
solara/template/button.py,sha256=HM382prl4bNLF8sLBd9Sh43ReMGedG_z_h4XN4mDYRI,311
|
|
160
160
|
solara/template/markdown.py,sha256=31G3ezFooiveSrUH5afz5_nJ8SStjbx-_x5YLXv_hPk,1137
|
|
161
161
|
solara/template/portal/.flake8,sha256=wxWLwamdP33Jm1mPa1sVe3uT0AZkG_wHPbY3Ci7j5-g,136
|
|
@@ -456,9 +456,9 @@ solara/widgets/vue/gridlayout.vue,sha256=LZk-YlqM7nv_7Y5TTq2xqfH1j2SLP1QOH5eiz7G
|
|
|
456
456
|
solara/widgets/vue/html.vue,sha256=48K5rjp0AdJDeRV6F3nOHW3J0WXPeHn55r5pGClK2fU,112
|
|
457
457
|
solara/widgets/vue/navigator.vue,sha256=3hhh2_sXpnsdM1vrs2nQ0bZHLCB10HhtQeYLS-tO85s,4790
|
|
458
458
|
solara/widgets/vue/vegalite.vue,sha256=zhocRsUCNIRQCEbD16er5sYnuHU0YThatRHnorA3P18,4596
|
|
459
|
-
solara_ui-1.
|
|
460
|
-
solara_ui-1.
|
|
461
|
-
solara_ui-1.
|
|
462
|
-
solara_ui-1.
|
|
463
|
-
solara_ui-1.
|
|
464
|
-
solara_ui-1.
|
|
459
|
+
solara_ui-1.56.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
|
|
460
|
+
solara_ui-1.56.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
|
|
461
|
+
solara_ui-1.56.0.dist-info/METADATA,sha256=Yg1AFtRjIvEuZ6VldkmH1J1_qA2lTQ2M7Q4DsN6MJKU,7304
|
|
462
|
+
solara_ui-1.56.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
463
|
+
solara_ui-1.56.0.dist-info/licenses/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
|
|
464
|
+
solara_ui-1.56.0.dist-info/RECORD,,
|
|
File without changes
|
{solara_ui-1.55.1.data → solara_ui-1.56.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|