solara 1.30.0__py2.py3-none-any.whl → 1.31.0__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.
Files changed (439) hide show
  1. {solara-1.30.0.dist-info → solara-1.31.0.dist-info}/METADATA +7 -42
  2. solara-1.31.0.dist-info/RECORD +5 -0
  3. {solara-1.30.0.dist-info → solara-1.31.0.dist-info}/WHEEL +1 -1
  4. {solara/template/portal → solara-1.31.0.dist-info/licenses}/LICENSE +1 -1
  5. solara/__init__.py +0 -123
  6. solara/__main__.py +0 -734
  7. solara/alias.py +0 -6
  8. solara/autorouting.py +0 -554
  9. solara/cache.py +0 -294
  10. solara/checks.html +0 -71
  11. solara/checks.py +0 -224
  12. solara/comm.py +0 -28
  13. solara/components/__init__.py +0 -59
  14. solara/components/alert.py +0 -155
  15. solara/components/applayout.py +0 -393
  16. solara/components/button.py +0 -85
  17. solara/components/card.py +0 -87
  18. solara/components/checkbox.py +0 -50
  19. solara/components/code_highlight_css.py +0 -11
  20. solara/components/code_highlight_css.vue +0 -63
  21. solara/components/columns.py +0 -159
  22. solara/components/component_vue.py +0 -109
  23. solara/components/cross_filter.py +0 -335
  24. solara/components/dataframe.py +0 -546
  25. solara/components/datatable.py +0 -221
  26. solara/components/datatable.vue +0 -175
  27. solara/components/details.py +0 -21
  28. solara/components/download.vue +0 -35
  29. solara/components/echarts.py +0 -75
  30. solara/components/echarts.vue +0 -128
  31. solara/components/figure_altair.py +0 -39
  32. solara/components/file_browser.py +0 -182
  33. solara/components/file_download.py +0 -199
  34. solara/components/file_drop.py +0 -139
  35. solara/components/file_drop.vue +0 -83
  36. solara/components/file_list_widget.vue +0 -78
  37. solara/components/head.py +0 -27
  38. solara/components/head_tag.py +0 -49
  39. solara/components/head_tag.vue +0 -60
  40. solara/components/image.py +0 -173
  41. solara/components/input.py +0 -440
  42. solara/components/link.py +0 -55
  43. solara/components/markdown.py +0 -371
  44. solara/components/markdown_editor.py +0 -25
  45. solara/components/markdown_editor.vue +0 -362
  46. solara/components/matplotlib.py +0 -74
  47. solara/components/meta.py +0 -47
  48. solara/components/misc.py +0 -333
  49. solara/components/pivot_table.py +0 -258
  50. solara/components/pivot_table.vue +0 -158
  51. solara/components/progress.py +0 -47
  52. solara/components/select.py +0 -186
  53. solara/components/select.vue +0 -27
  54. solara/components/slider.py +0 -442
  55. solara/components/slider_date.vue +0 -56
  56. solara/components/spinner-solara.vue +0 -105
  57. solara/components/spinner.py +0 -30
  58. solara/components/sql_code.py +0 -33
  59. solara/components/sql_code.vue +0 -128
  60. solara/components/style.py +0 -105
  61. solara/components/switch.py +0 -68
  62. solara/components/tab_navigation.py +0 -37
  63. solara/components/title.py +0 -90
  64. solara/components/title.vue +0 -38
  65. solara/components/togglebuttons.py +0 -202
  66. solara/components/tooltip.py +0 -61
  67. solara/datatypes.py +0 -143
  68. solara/express.py +0 -241
  69. solara/hooks/__init__.py +0 -4
  70. solara/hooks/dataframe.py +0 -99
  71. solara/hooks/misc.py +0 -263
  72. solara/hooks/use_reactive.py +0 -129
  73. solara/hooks/use_thread.py +0 -129
  74. solara/kitchensink.py +0 -8
  75. solara/lab/__init__.py +0 -34
  76. solara/lab/components/__init__.py +0 -6
  77. solara/lab/components/chat.py +0 -203
  78. solara/lab/components/confirmation_dialog.py +0 -165
  79. solara/lab/components/cross_filter.py +0 -7
  80. solara/lab/components/input_date.py +0 -298
  81. solara/lab/components/menu.py +0 -181
  82. solara/lab/components/menu.vue +0 -38
  83. solara/lab/components/tabs.py +0 -274
  84. solara/lab/components/theming.py +0 -98
  85. solara/lab/components/theming.vue +0 -72
  86. solara/lab/hooks/__init__.py +0 -0
  87. solara/lab/hooks/dataframe.py +0 -12
  88. solara/lab/toestand.py +0 -3
  89. solara/lab/utils/__init__.py +0 -2
  90. solara/lab/utils/cookies.py +0 -5
  91. solara/lab/utils/dataframe.py +0 -115
  92. solara/lab/utils/headers.py +0 -5
  93. solara/layout.py +0 -44
  94. solara/minisettings.py +0 -133
  95. solara/py.typed +0 -0
  96. solara/reactive.py +0 -93
  97. solara/routing.py +0 -268
  98. solara/scope/__init__.py +0 -87
  99. solara/scope/types.py +0 -55
  100. solara/server/__init__.py +0 -0
  101. solara/server/app.py +0 -490
  102. solara/server/assets/custom.css +0 -1
  103. solara/server/assets/custom.js +0 -1
  104. solara/server/assets/favicon.png +0 -0
  105. solara/server/assets/favicon.svg +0 -5
  106. solara/server/assets/style.css +0 -1665
  107. solara/server/assets/theme-dark.css +0 -437
  108. solara/server/assets/theme-light.css +0 -420
  109. solara/server/assets/theme.js +0 -3
  110. solara/server/cdn_helper.py +0 -77
  111. solara/server/esm.py +0 -69
  112. solara/server/fastapi.py +0 -5
  113. solara/server/flask.py +0 -286
  114. solara/server/jupyter/__init__.py +0 -2
  115. solara/server/jupyter/cdn_handler.py +0 -28
  116. solara/server/jupyter/server_extension.py +0 -29
  117. solara/server/jupytertools.py +0 -46
  118. solara/server/kernel.py +0 -319
  119. solara/server/kernel_context.py +0 -393
  120. solara/server/patch.py +0 -552
  121. solara/server/reload.py +0 -242
  122. solara/server/server.py +0 -437
  123. solara/server/settings.py +0 -212
  124. solara/server/shell.py +0 -240
  125. solara/server/starlette.py +0 -597
  126. solara/server/static/ansi.js +0 -270
  127. solara/server/static/highlight-dark.css +0 -82
  128. solara/server/static/highlight.css +0 -43
  129. solara/server/static/main-vuetify.js +0 -260
  130. solara/server/static/main.js +0 -163
  131. solara/server/static/solara_bootstrap.py +0 -129
  132. solara/server/static/sun.svg +0 -23
  133. solara/server/static/webworker.js +0 -42
  134. solara/server/telemetry.py +0 -212
  135. solara/server/templates/index.html.j2 +0 -1
  136. solara/server/templates/loader-plain.css +0 -11
  137. solara/server/templates/loader-plain.html +0 -20
  138. solara/server/templates/loader-solara.css +0 -111
  139. solara/server/templates/loader-solara.html +0 -40
  140. solara/server/templates/plain.html +0 -82
  141. solara/server/templates/solara.html.j2 +0 -446
  142. solara/server/threaded.py +0 -75
  143. solara/server/utils.py +0 -30
  144. solara/server/websocket.py +0 -44
  145. solara/settings.py +0 -56
  146. solara/tasks.py +0 -847
  147. solara/template/button.py +0 -16
  148. solara/template/markdown.py +0 -42
  149. solara/template/portal/.flake8 +0 -6
  150. solara/template/portal/.pre-commit-config.yaml +0 -28
  151. solara/template/portal/Procfile +0 -7
  152. solara/template/portal/mypy.ini +0 -3
  153. solara/template/portal/pyproject.toml +0 -26
  154. solara/template/portal/solara_portal/__init__.py +0 -3
  155. solara/template/portal/solara_portal/components/__init__.py +0 -2
  156. solara/template/portal/solara_portal/components/article.py +0 -28
  157. solara/template/portal/solara_portal/components/data.py +0 -28
  158. solara/template/portal/solara_portal/components/header.py +0 -6
  159. solara/template/portal/solara_portal/components/layout.py +0 -6
  160. solara/template/portal/solara_portal/content/articles/equis-in-vidi.md +0 -85
  161. solara/template/portal/solara_portal/content/articles/substiterat-vati.md +0 -70
  162. solara/template/portal/solara_portal/data.py +0 -60
  163. solara/template/portal/solara_portal/pages/__init__.py +0 -67
  164. solara/template/portal/solara_portal/pages/article/__init__.py +0 -26
  165. solara/template/portal/solara_portal/pages/tabular.py +0 -29
  166. solara/template/portal/solara_portal/pages/viz/__init__.py +0 -69
  167. solara/template/portal/solara_portal/pages/viz/overview.py +0 -14
  168. solara/test/__init__.py +0 -0
  169. solara/test/pytest_plugin.py +0 -698
  170. solara/toestand.py +0 -772
  171. solara/util.py +0 -308
  172. solara/website/__init__.py +0 -0
  173. solara/website/assets/custom.css +0 -462
  174. solara/website/assets/images/logo-small.png +0 -0
  175. solara/website/assets/images/logo.svg +0 -17
  176. solara/website/assets/images/logo_white.svg +0 -50
  177. solara/website/assets/theme.js +0 -8
  178. solara/website/components/__init__.py +0 -5
  179. solara/website/components/algolia.vue +0 -24
  180. solara/website/components/algolia_api.vue +0 -157
  181. solara/website/components/docs.py +0 -118
  182. solara/website/components/header.py +0 -72
  183. solara/website/components/hero.py +0 -15
  184. solara/website/components/mailchimp.py +0 -12
  185. solara/website/components/mailchimp.vue +0 -47
  186. solara/website/components/notebook.py +0 -172
  187. solara/website/pages/__init__.py +0 -564
  188. solara/website/pages/apps/__init__.py +0 -16
  189. solara/website/pages/apps/authorization/__init__.py +0 -118
  190. solara/website/pages/apps/authorization/admin.py +0 -12
  191. solara/website/pages/apps/authorization/users.py +0 -12
  192. solara/website/pages/apps/jupyter-dashboard-1.py +0 -116
  193. solara/website/pages/apps/layout-demo.py +0 -40
  194. solara/website/pages/apps/multipage/__init__.py +0 -38
  195. solara/website/pages/apps/multipage/page1.py +0 -26
  196. solara/website/pages/apps/multipage/page2.py +0 -34
  197. solara/website/pages/apps/scatter.py +0 -136
  198. solara/website/pages/apps/scrolling.py +0 -63
  199. solara/website/pages/apps/tutorial-streamlit.py +0 -18
  200. solara/website/pages/changelog/__init__.py +0 -8
  201. solara/website/pages/changelog/changelog.md +0 -180
  202. solara/website/pages/contact/__init__.py +0 -8
  203. solara/website/pages/contact/contact.md +0 -17
  204. solara/website/pages/doc_use_download.py +0 -85
  205. solara/website/pages/documentation/__init__.py +0 -184
  206. solara/website/pages/documentation/advanced/__init__.py +0 -36
  207. solara/website/pages/documentation/advanced/content/00-overview.md +0 -1
  208. solara/website/pages/documentation/advanced/content/10-howto/00-overview.md +0 -1
  209. solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md +0 -191
  210. solara/website/pages/documentation/advanced/content/10-howto/20-layout.md +0 -120
  211. solara/website/pages/documentation/advanced/content/10-howto/30-testing.md +0 -149
  212. solara/website/pages/documentation/advanced/content/10-howto/31-debugging.md +0 -66
  213. solara/website/pages/documentation/advanced/content/10-howto/40-embed.md +0 -43
  214. solara/website/pages/documentation/advanced/content/10-howto/50-ipywidget_libraries.md +0 -120
  215. solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +0 -4
  216. solara/website/pages/documentation/advanced/content/20-understanding/05-ipywidgets.md +0 -30
  217. solara/website/pages/documentation/advanced/content/20-understanding/06-ipyvuetify.md +0 -38
  218. solara/website/pages/documentation/advanced/content/20-understanding/10-reacton.md +0 -24
  219. solara/website/pages/documentation/advanced/content/20-understanding/12-reacton-basics.md +0 -104
  220. solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md +0 -19
  221. solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +0 -3
  222. solara/website/pages/documentation/advanced/content/20-understanding/18-containers.md +0 -160
  223. solara/website/pages/documentation/advanced/content/20-understanding/20-solara.md +0 -13
  224. solara/website/pages/documentation/advanced/content/20-understanding/40-routing.md +0 -236
  225. solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md +0 -81
  226. solara/website/pages/documentation/advanced/content/20-understanding/60-voila.md +0 -7
  227. solara/website/pages/documentation/advanced/content/30-enterprise/00-overview.md +0 -1
  228. solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md +0 -167
  229. solara/website/pages/documentation/advanced/content/40-development/00-overview.md +0 -0
  230. solara/website/pages/documentation/advanced/content/40-development/01-contribute.md +0 -41
  231. solara/website/pages/documentation/advanced/content/40-development/10-setup.md +0 -72
  232. solara/website/pages/documentation/advanced/content/__init__.py +0 -0
  233. solara/website/pages/documentation/api/__init__.py +0 -19
  234. solara/website/pages/documentation/api/cross_filter/__init__.py +0 -9
  235. solara/website/pages/documentation/api/cross_filter/cross_filter_dataframe.py +0 -23
  236. solara/website/pages/documentation/api/cross_filter/cross_filter_report.py +0 -22
  237. solara/website/pages/documentation/api/cross_filter/cross_filter_select.py +0 -22
  238. solara/website/pages/documentation/api/cross_filter/cross_filter_slider.py +0 -22
  239. solara/website/pages/documentation/api/hooks/__init__.py +0 -9
  240. solara/website/pages/documentation/api/hooks/use_cross_filter.py +0 -25
  241. solara/website/pages/documentation/api/hooks/use_dark_effective.py +0 -13
  242. solara/website/pages/documentation/api/hooks/use_effect.md +0 -43
  243. solara/website/pages/documentation/api/hooks/use_effect.py +0 -9
  244. solara/website/pages/documentation/api/hooks/use_exception.py +0 -33
  245. solara/website/pages/documentation/api/hooks/use_memo.md +0 -16
  246. solara/website/pages/documentation/api/hooks/use_memo.py +0 -9
  247. solara/website/pages/documentation/api/hooks/use_previous.py +0 -32
  248. solara/website/pages/documentation/api/hooks/use_reactive.py +0 -15
  249. solara/website/pages/documentation/api/hooks/use_state.py +0 -11
  250. solara/website/pages/documentation/api/hooks/use_state_or_update.py +0 -68
  251. solara/website/pages/documentation/api/hooks/use_thread.md +0 -58
  252. solara/website/pages/documentation/api/hooks/use_thread.py +0 -44
  253. solara/website/pages/documentation/api/hooks/use_trait_observe.py +0 -13
  254. solara/website/pages/documentation/api/routing/__init__.py +0 -9
  255. solara/website/pages/documentation/api/routing/generate_routes.py +0 -11
  256. solara/website/pages/documentation/api/routing/generate_routes_directory.py +0 -11
  257. solara/website/pages/documentation/api/routing/resolve_path.py +0 -36
  258. solara/website/pages/documentation/api/routing/route.py +0 -32
  259. solara/website/pages/documentation/api/routing/use_route.py +0 -80
  260. solara/website/pages/documentation/api/routing/use_router.py +0 -15
  261. solara/website/pages/documentation/api/utilities/__init__.py +0 -9
  262. solara/website/pages/documentation/api/utilities/component_vue.py +0 -11
  263. solara/website/pages/documentation/api/utilities/computed.py +0 -16
  264. solara/website/pages/documentation/api/utilities/display.py +0 -15
  265. solara/website/pages/documentation/api/utilities/get_kernel_id.py +0 -16
  266. solara/website/pages/documentation/api/utilities/get_session_id.py +0 -16
  267. solara/website/pages/documentation/api/utilities/memoize.py +0 -36
  268. solara/website/pages/documentation/api/utilities/on_kernel_start.py +0 -27
  269. solara/website/pages/documentation/api/utilities/reactive.py +0 -15
  270. solara/website/pages/documentation/api/utilities/widget.py +0 -104
  271. solara/website/pages/documentation/components/__init__.py +0 -12
  272. solara/website/pages/documentation/components/advanced/__init__.py +0 -9
  273. solara/website/pages/documentation/components/advanced/link.py +0 -28
  274. solara/website/pages/documentation/components/advanced/meta.py +0 -21
  275. solara/website/pages/documentation/components/advanced/style.py +0 -44
  276. solara/website/pages/documentation/components/common.py +0 -9
  277. solara/website/pages/documentation/components/data/__init__.py +0 -9
  278. solara/website/pages/documentation/components/data/dataframe.py +0 -44
  279. solara/website/pages/documentation/components/data/pivot_table.py +0 -81
  280. solara/website/pages/documentation/components/enterprise/__init__.py +0 -9
  281. solara/website/pages/documentation/components/enterprise/avatar.py +0 -19
  282. solara/website/pages/documentation/components/enterprise/avatar_menu.py +0 -20
  283. solara/website/pages/documentation/components/input/__init__.py +0 -9
  284. solara/website/pages/documentation/components/input/button.py +0 -22
  285. solara/website/pages/documentation/components/input/checkbox.py +0 -12
  286. solara/website/pages/documentation/components/input/file_browser.py +0 -33
  287. solara/website/pages/documentation/components/input/file_drop.py +0 -75
  288. solara/website/pages/documentation/components/input/input.py +0 -18
  289. solara/website/pages/documentation/components/input/select.py +0 -21
  290. solara/website/pages/documentation/components/input/slider.py +0 -28
  291. solara/website/pages/documentation/components/input/switch.py +0 -12
  292. solara/website/pages/documentation/components/input/togglebuttons.py +0 -20
  293. solara/website/pages/documentation/components/lab/__init__.py +0 -9
  294. solara/website/pages/documentation/components/lab/chat.py +0 -108
  295. solara/website/pages/documentation/components/lab/confirmation_dialog.py +0 -55
  296. solara/website/pages/documentation/components/lab/cookies_headers.py +0 -48
  297. solara/website/pages/documentation/components/lab/input_date.py +0 -19
  298. solara/website/pages/documentation/components/lab/menu.py +0 -21
  299. solara/website/pages/documentation/components/lab/tab.py +0 -24
  300. solara/website/pages/documentation/components/lab/tabs.py +0 -44
  301. solara/website/pages/documentation/components/lab/task.py +0 -12
  302. solara/website/pages/documentation/components/lab/theming.py +0 -72
  303. solara/website/pages/documentation/components/lab/use_task.py +0 -12
  304. solara/website/pages/documentation/components/layout/__init__.py +0 -9
  305. solara/website/pages/documentation/components/layout/app_bar.py +0 -15
  306. solara/website/pages/documentation/components/layout/app_bar_title.py +0 -15
  307. solara/website/pages/documentation/components/layout/app_layout.py +0 -23
  308. solara/website/pages/documentation/components/layout/card.py +0 -14
  309. solara/website/pages/documentation/components/layout/card_actions.py +0 -15
  310. solara/website/pages/documentation/components/layout/column.py +0 -29
  311. solara/website/pages/documentation/components/layout/columns.py +0 -26
  312. solara/website/pages/documentation/components/layout/columns_responsive.py +0 -67
  313. solara/website/pages/documentation/components/layout/griddraggable.py +0 -61
  314. solara/website/pages/documentation/components/layout/gridfixed.py +0 -21
  315. solara/website/pages/documentation/components/layout/hbox.py +0 -17
  316. solara/website/pages/documentation/components/layout/row.py +0 -29
  317. solara/website/pages/documentation/components/layout/sidebar.py +0 -23
  318. solara/website/pages/documentation/components/layout/vbox.py +0 -19
  319. solara/website/pages/documentation/components/output/__init__.py +0 -9
  320. solara/website/pages/documentation/components/output/file_download.py +0 -12
  321. solara/website/pages/documentation/components/output/html.py +0 -22
  322. solara/website/pages/documentation/components/output/image.py +0 -12
  323. solara/website/pages/documentation/components/output/markdown.py +0 -59
  324. solara/website/pages/documentation/components/output/markdown_editor.py +0 -53
  325. solara/website/pages/documentation/components/output/sql_code.py +0 -84
  326. solara/website/pages/documentation/components/output/tooltip.py +0 -12
  327. solara/website/pages/documentation/components/page/__init__.py +0 -9
  328. solara/website/pages/documentation/components/page/head.py +0 -19
  329. solara/website/pages/documentation/components/page/title.py +0 -28
  330. solara/website/pages/documentation/components/status/__init__.py +0 -9
  331. solara/website/pages/documentation/components/status/error.py +0 -40
  332. solara/website/pages/documentation/components/status/info.py +0 -40
  333. solara/website/pages/documentation/components/status/progress.py +0 -10
  334. solara/website/pages/documentation/components/status/spinner.py +0 -10
  335. solara/website/pages/documentation/components/status/success.py +0 -40
  336. solara/website/pages/documentation/components/status/warning.py +0 -47
  337. solara/website/pages/documentation/components/viz/__init__.py +0 -9
  338. solara/website/pages/documentation/components/viz/altair.py +0 -44
  339. solara/website/pages/documentation/components/viz/echarts.py +0 -78
  340. solara/website/pages/documentation/components/viz/matplotlib.py +0 -32
  341. solara/website/pages/documentation/components/viz/plotly.py +0 -63
  342. solara/website/pages/documentation/components/viz/plotly_express.py +0 -41
  343. solara/website/pages/documentation/examples/__init__.py +0 -52
  344. solara/website/pages/documentation/examples/ai/__init__.py +0 -10
  345. solara/website/pages/documentation/examples/ai/chatbot.py +0 -96
  346. solara/website/pages/documentation/examples/ai/tokenizer.py +0 -106
  347. solara/website/pages/documentation/examples/basics/__init__.py +0 -2
  348. solara/website/pages/documentation/examples/basics/sine.py +0 -28
  349. solara/website/pages/documentation/examples/fullscreen/__init__.py +0 -9
  350. solara/website/pages/documentation/examples/fullscreen/authorization.py +0 -3
  351. solara/website/pages/documentation/examples/fullscreen/layout_demo.py +0 -3
  352. solara/website/pages/documentation/examples/fullscreen/multipage.py +0 -3
  353. solara/website/pages/documentation/examples/fullscreen/scatter.py +0 -3
  354. solara/website/pages/documentation/examples/fullscreen/scrolling.py +0 -3
  355. solara/website/pages/documentation/examples/fullscreen/tutorial_streamlit.py +0 -3
  356. solara/website/pages/documentation/examples/general/__init__.py +0 -9
  357. solara/website/pages/documentation/examples/general/custom_storage.py +0 -69
  358. solara/website/pages/documentation/examples/general/deploy_model.py +0 -114
  359. solara/website/pages/documentation/examples/general/live_update.py +0 -38
  360. solara/website/pages/documentation/examples/general/login_oauth.py +0 -76
  361. solara/website/pages/documentation/examples/general/mycard.vue +0 -58
  362. solara/website/pages/documentation/examples/general/pokemon_search.py +0 -51
  363. solara/website/pages/documentation/examples/general/vue_component.py +0 -50
  364. solara/website/pages/documentation/examples/ipycanvas.py +0 -49
  365. solara/website/pages/documentation/examples/libraries/__init__.py +0 -9
  366. solara/website/pages/documentation/examples/libraries/altair.py +0 -63
  367. solara/website/pages/documentation/examples/libraries/bqplot.py +0 -39
  368. solara/website/pages/documentation/examples/libraries/ipyleaflet.py +0 -32
  369. solara/website/pages/documentation/examples/libraries/ipyleaflet_advanced.py +0 -65
  370. solara/website/pages/documentation/examples/utilities/__init__.py +0 -9
  371. solara/website/pages/documentation/examples/utilities/calculator.py +0 -157
  372. solara/website/pages/documentation/examples/utilities/countdown_timer.py +0 -64
  373. solara/website/pages/documentation/examples/utilities/todo.py +0 -195
  374. solara/website/pages/documentation/examples/visualization/__init__.py +0 -6
  375. solara/website/pages/documentation/examples/visualization/annotator.py +0 -68
  376. solara/website/pages/documentation/examples/visualization/linked_views.py +0 -84
  377. solara/website/pages/documentation/examples/visualization/plotly.py +0 -43
  378. solara/website/pages/documentation/faq/__init__.py +0 -11
  379. solara/website/pages/documentation/faq/content/99-faq.md +0 -73
  380. solara/website/pages/documentation/getting_started/__init__.py +0 -15
  381. solara/website/pages/documentation/getting_started/content/00-quickstart.md +0 -84
  382. solara/website/pages/documentation/getting_started/content/01-introduction.md +0 -121
  383. solara/website/pages/documentation/getting_started/content/02-installing.md +0 -81
  384. solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +0 -9
  385. solara/website/pages/documentation/getting_started/content/04-tutorials/10_data_science.py +0 -13
  386. solara/website/pages/documentation/getting_started/content/04-tutorials/20-web-app.md +0 -84
  387. solara/website/pages/documentation/getting_started/content/04-tutorials/30-ipywidgets.md +0 -120
  388. solara/website/pages/documentation/getting_started/content/04-tutorials/40-streamlit.md +0 -141
  389. solara/website/pages/documentation/getting_started/content/04-tutorials/50-dash.md +0 -140
  390. solara/website/pages/documentation/getting_started/content/04-tutorials/60-jupyter-dashboard-part1.py +0 -64
  391. solara/website/pages/documentation/getting_started/content/04-tutorials/SF_crime_sample.csv.gz +0 -0
  392. solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb +0 -445
  393. solara/website/pages/documentation/getting_started/content/04-tutorials/_jupyter_dashboard_1.ipynb +0 -1000
  394. solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +0 -7
  395. solara/website/pages/documentation/getting_started/content/05-fundamentals/10-components.md +0 -218
  396. solara/website/pages/documentation/getting_started/content/05-fundamentals/50-state-management.md +0 -83
  397. solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +0 -3
  398. solara/website/pages/documentation/getting_started/content/06-reference/40-static_files.md +0 -27
  399. solara/website/pages/documentation/getting_started/content/06-reference/41-asset-files.md +0 -32
  400. solara/website/pages/documentation/getting_started/content/06-reference/60-static-site-generation.md +0 -55
  401. solara/website/pages/documentation/getting_started/content/06-reference/70-search.md +0 -30
  402. solara/website/pages/documentation/getting_started/content/06-reference/80-reloading.md +0 -30
  403. solara/website/pages/documentation/getting_started/content/06-reference/90-notebook-support.md +0 -4
  404. solara/website/pages/documentation/getting_started/content/06-reference/95-caching.md +0 -143
  405. solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +0 -3
  406. solara/website/pages/documentation/getting_started/content/07-deploying/10-self-hosted.md +0 -269
  407. solara/website/pages/documentation/getting_started/content/07-deploying/20-cloud-hosted.md +0 -76
  408. solara/website/pages/documentation/getting_started/content/08-lab/00-what-is-lab.md +0 -3
  409. solara/website/pages/documentation/getting_started/content/90-troubleshoot.md +0 -22
  410. solara/website/pages/documentation/getting_started/content/__init__.py +0 -0
  411. solara/website/pages/docutils.py +0 -38
  412. solara/website/pages/showcase/__init__.py +0 -105
  413. solara/website/pages/showcase/domino_code_assist.py +0 -60
  414. solara/website/pages/showcase/planeto_tessa.py +0 -19
  415. solara/website/pages/showcase/solara_dev.py +0 -54
  416. solara/website/pages/showcase/solarathon_2023_team_2.py +0 -22
  417. solara/website/pages/showcase/solarathon_2023_team_4.py +0 -22
  418. solara/website/pages/showcase/solarathon_2023_team_5.py +0 -23
  419. solara/website/pages/showcase/solarathon_2023_team_6.py +0 -34
  420. solara/website/pages/showcase/wanderlust.py +0 -27
  421. solara/website/public/beach.jpeg +0 -0
  422. solara/website/public/logo.svg +0 -6
  423. solara/website/public/social/discord.svg +0 -1
  424. solara/website/public/social/github.svg +0 -1
  425. solara/website/public/social/twitter.svg +0 -3
  426. solara/website/public/success.html +0 -25
  427. solara/website/templates/index.html.j2 +0 -117
  428. solara/website/utils.py +0 -51
  429. solara/widgets/__init__.py +0 -1
  430. solara/widgets/vue/gridlayout.vue +0 -110
  431. solara/widgets/vue/html.vue +0 -4
  432. solara/widgets/vue/navigator.vue +0 -104
  433. solara/widgets/vue/vegalite.vue +0 -115
  434. solara/widgets/widgets.py +0 -65
  435. solara-1.30.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -7
  436. solara-1.30.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -7
  437. solara-1.30.0.dist-info/RECORD +0 -438
  438. solara-1.30.0.dist-info/entry_points.txt +0 -5
  439. /solara-1.30.0.dist-info/licenses/LICENSE → /LICENSE +0 -0
@@ -1,191 +0,0 @@
1
- # Multi-page support
2
-
3
- In the [Web App tutorial](/documentation/getting_started/tutorials/web-app), we created an application consisting of a single page. Web applications generally have multiple pages, and Solara supports this as well.
4
-
5
-
6
- ## Multiple scripts
7
-
8
- The simplest way to create a multi-page app is to create a directory with multiple scripts.
9
-
10
- ```bash
11
- $ solara create button multipage-demo/01-click-button.py
12
- Wrote: /mypath/multipage-demo/01-click-button.py
13
- ...
14
- $ solara create markdown multipage-demo/02-markdown-editor.py
15
- Wrote: /mypath/multipage-demo/02-markdown-editor.py
16
- ...
17
- ```
18
-
19
-
20
- You should have the following directory structure:
21
-
22
- ```
23
- multipage-demo
24
- ├── 01-click-button.py
25
- └── 02-markdown-editor.py
26
- ```
27
-
28
- Now run Solara, with this directory as argument:
29
-
30
- ```bash
31
- $ solara run ./multipage-demo
32
- Solara server is starting at http://localhost:8765
33
- ```
34
-
35
- Giving you an output like:
36
-
37
- ![screencapture](https://user-images.githubusercontent.com/1765949/214879312-19323de3-c4ce-4528-ac84-5aa0021ca5b4.gif)
38
-
39
- Solara now:
40
-
41
- * Sort the paths according to the filename (hence the 01- and 02- prefix)
42
- * Generate a nice URL by stripping of prefix, splitting the filename taking out `-`, `_` and spaces, and join them together using a `-` (e.g. "/markdown-editor").
43
- * Generate a nice default title similar to the link, but now capitalize the first letter and join with a space instead (e.g. "Mardown Editor").
44
- * The first page will be the default (and its URL will be empty instead, i.e., the empty string `""`)
45
- * Since the first script does not define a `Layout` component, nor did we add a `__init__.py` with a `Layout` component, Solara will add a [Layout component](/documentation/components/layout/app_layout) which includes a navigation sidebar.
46
- * If a path is a directory, Solara will recursively scan the subdirectory and include it in the navigation. Read more on this in the [Layout section](layout)
47
-
48
- Solara will render two pages:
49
-
50
- * http://localhost:8765 with title "Click Button"
51
- * http://localhost:8765/markdown-editor with title "Markdown Editor"
52
-
53
-
54
-
55
- ## Classical widgets support
56
-
57
- Multipage is also supported for regular ipywidgets. An example directory can be seen on [GitHub](https://github.com/widgetti/solara/tree/master/tests/unit/solara_test_apps/multipage),
58
- which we use for testing.
59
-
60
- A large difference between using regular ipywidgets for pages compared to using components is that there is no lifecycle
61
- management in regular ipywidgets. This means Solara cannot clean up your ipywidget-based page (garbage-collect the unused widgets, unregister callbacks)
62
- when a user navigates away from your page.
63
-
64
- At the same time, rerunning your regular ipywidget-based script each time a user navigates to that page will result in a buildup of many widgets.
65
-
66
- This means that Solara will run your page once (the first time it is loaded by a user/browser tab), and, when navigating back,
67
- will show the page in the same state as when the user left the page.
68
-
69
-
70
- ## As a package
71
-
72
- Once you start building a larger application, it pays off using a Python package instead. This allows you to organize and distribute your app as a Python package (as a wheel for instance) and allows you to organize your application
73
- into reusable packages for components, stores, hooks etc.
74
-
75
- As a quickstart, we can generate a startup project using:
76
- ```bash
77
- $ solara create portal solara-test-portal
78
- Wrote: /Users/maartenbreddels/github/widgetti/solara/solara-test-portal
79
- Install as:
80
- $ (cd solara-test-portal; pip install -e .)
81
- Run as:
82
- $ solara run solara_test_portal.pages
83
- ```
84
-
85
- You should have the following directory structure:
86
- ```bash
87
- ├── LICENSE
88
- ├── Procfile # will make it run on heroku
89
- ├── mypy.ini # adds strict type checking
90
- ├── pyproject.toml # make it installable with pip/hatch etc
91
- └── solara_test_portal # Python package containing all code
92
- ├── __init__.py
93
- ├── components # contains general react components
94
- │ ├── __init__.py
95
- │ ├── header.py
96
- │ └── layout.py
97
- ├── content # contains content (markdown articles in this case)
98
- │ └── articles
99
- │ ├── 7-reasons-why-i-love-vaex-for-data-science.md
100
- │ └── a-hybrid-apache-arrow-numpy-dataframe-with-vaex-version-4.md
101
- ├── data.py # here is where we store shared data or application state
102
- └── pages # contains the pages
103
- ├── __init__.py
104
- ├── article
105
- │ └── __init__.py
106
- ├── tabular.py
107
- └── viz
108
- ├── __init__.py
109
- └── overview.py
110
- ```
111
-
112
- Install it using
113
- ```bash
114
- $ (cd solara-test-portal; pip install -e .)
115
- ```
116
-
117
- Run it with
118
- ```bash
119
- $ solara run solara_test_portal.pages
120
- Solara server is starting at http://localhost:8765
121
- ```
122
-
123
- Go to http://localhost:8765 ([or click here](http://localhost:8765)), explore the source code, edit it, save it, and watch the web app reload instantly.
124
-
125
-
126
- ## In a single script
127
-
128
- If you want to setup a multipage app in a single script, you do not need to define a `Page` component, but you can define a list of routes.
129
-
130
- ```python
131
- import solara
132
-
133
-
134
- @solara.component
135
- def Home():
136
- solara.Markdown("Home")
137
-
138
-
139
- @solara.component
140
- def About():
141
- solara.Markdown("About")
142
-
143
-
144
- routes = [
145
- solara.Route(path="/", component=Home, label="home"),
146
- solara.Route(path="about", component=About, label="about"),
147
- ]
148
- ```
149
-
150
- See more details in the [Route section](/documentation/advanced/understanding/routing).
151
-
152
- ## Dynamic pages
153
-
154
- In the previous section we created the example portal app. Taking a look at
155
- tabular.py, we see the `Page` component takes an additional arguments.
156
-
157
- ```python
158
- @solara.component
159
- def Page(name: str):
160
- ...
161
- ```
162
-
163
-
164
- Solara recognizes this and will pass all routes such as `/tabular/foo` and `/tabular/bar` to this Page component passing for instance `"foo"` or `"bar"` as an argument, such that you can dynamically render a page based on the URL.
165
-
166
- An example Page component could look like this:
167
-
168
- ```python
169
- @solara.component
170
- def Page(name: str = "foo"):
171
- subpages = ["foo", "bar", "solara", "react-ipywidgets"]
172
- solara.Markdown(f"You are at: {name}")
173
- # bunch of buttons which navigate to our dynamic route
174
- with solara.Row():
175
- for subpage in subpages:
176
- with solara.Link(subpage):
177
- solara.Button(label=f"Go to: {subpage}")
178
- ```
179
-
180
- By giving the name argument a default value of `"foo"`, Solara will also accept the `/tabular` url.
181
-
182
- # What you have learned
183
-
184
- * Putting multiple Solara app script into a directory allows Solara to show a multipage app.
185
- * If no `Layout` component is provided, Solara adds a default navigation sidebar.
186
- * Large application can benefit from setting up a Python package, use `solara create portal my-name` to create one.
187
- * By adding an argument to the `Page` component, routes like `/tabular` will turn into dynamic routes (e.g. `/tabular/dynamic-name`) and pass the argument (`"dynamic-name"` in this case) to the `Page` component to implement dynamic pages.
188
-
189
- # What next?
190
-
191
- * Also check out the [Multipage example](/documentation/examples/fullscreen/multipage) for more inspiration.
@@ -1,120 +0,0 @@
1
- # Layout
2
-
3
- Solara comes with a layout system ideal for data apps.
4
-
5
- The following example shows 80% of what you need to know to lay out your app.
6
-
7
- ```solara
8
- import solara
9
-
10
- @solara.component
11
- def Page():
12
- with solara.Column():
13
- solara.Title("I'm in the browser tab and the toolbar")
14
- with solara.Sidebar():
15
- solara.Markdown("## I am in the sidebar")
16
- solara.SliderInt(label="Ideal for placing controls")
17
- solara.Info("I'm in the main content area, put your main content here")
18
- with solara.Card("Use solara.Columns([1, 2]) to create relatively sized columns"):
19
- with solara.Columns([1, 2]):
20
- solara.Success("I'm in the first column")
21
- solara.Warning("I'm in the second column, I am twice as wide")
22
- solara.Info("I am like the first column")
23
-
24
- with solara.Card("Use solara.Column() to create a full width column"):
25
- with solara.Column():
26
- solara.Success("I'm first in this full with column")
27
- solara.Warning("I'm second in this full with column")
28
- solara.Error("I'm third in this full with column")
29
-
30
- with solara.Card("Use solara.ColumnsResponsive(6, large=4) to response to screen size"):
31
- with solara.ColumnsResponsive(6, large=4):
32
- for i in range(6):
33
- solara.Info("two per column on small screens, three per column on large screens")
34
- ```
35
-
36
- [Navigate here to watch this layout in a full browser window](/documentation/examples/fullscreen/layout_demo)
37
-
38
- The key takeaways are:
39
-
40
- * By default, Solara will wrap your component in an [AppLayout](/documentation/components/layout/app_layout), which will give you:
41
- * Room for a sidebar, that you can populate using the [Sidebar](/documentation/components/layout/sidebar) component.
42
- * A toolbar showing the [Title](/documentation/components/page/title).
43
- * Not visible here: In the case of [multiple pages](/documentation/advanced/howto/multipage) will include page navigation tabs. See [The multipage demo app](/documentation/examples/fullscreen/multipage) for an example.
44
- * Use [Card](/documentation/components/layout/card) to put related components together with a title.
45
- * Use [Column](/documentation/components/layout/column) to simply layout components under each other.
46
- * Use [Columns](/documentation/components/layout/columns) if you want to have a few columns with relative sizes next to each other.
47
- * Use [ColumnsResponsive](/documentation/components/layout/columns_responsive) to have the column widths respond to screen size.
48
-
49
-
50
-
51
- ## Changing the default layout
52
-
53
- While [AppLayout](/documentation/components/layout/app_layout) may be sufficient in 80% of the cases. Solara provides a way to change this default layout in [Solara server](/documentation/advanced/understanding/solara-server).
54
-
55
- You can define your own `Layout` component in the `__init__.py` file in the same directory of your app script.
56
-
57
-
58
- For instance, putting the following `Layout` component in `__init__.py` will give you effectively the same [AppLayout](/documentation/components/layout/app_layout):
59
- ```python
60
- @solara.component
61
- def Layout(children=[]):
62
- print("I get called before the Page component gets rendered")
63
- return solara.AppLayout(children=children)
64
- ```
65
-
66
-
67
- ### No Layout
68
- If you do not want to have any layout, you can disable it using:
69
-
70
- ```python
71
- @solara.component
72
- def Layout(children=[]):
73
- # there will only be 1 child, which is the Page()
74
- return children[0]
75
- ```
76
-
77
- This layout leaves every page responsible for creating its own header, footer, and/or menu structure for navigation.
78
-
79
-
80
- ### Layout with navigation
81
-
82
- In case you want to set up your own layout system, which sets up navigation as well, this example may get you started. It may help
83
- to [understand routing](/documentation/advanced/understanding/routing).
84
- ```python
85
- @solara.component
86
- def Layout(children=[]):
87
- # Note that children being passed here for this example will be a Page() element.
88
- route_current, routes_all = solara.use_route()
89
- with solara.Column():
90
- # put all buttons in a single row
91
- with solara.Row():
92
- for route in routes_all:
93
- with solara.Link(route):
94
- solara.Button(route.path, color="red" if route_current == route else None)
95
- # under the navigation buttons, we add our children (the single Page())
96
- solara.Column(children=children)
97
- ```
98
-
99
-
100
- ### Nested Layouts
101
-
102
- Each subdirectory (or subpackage) can define a `Layout` component in its own `__init__.py`, which then is embedded into the parent Layout to provide a hierarchical
103
- nested layout tree.
104
-
105
- This is useful for larger apps where each subdirectory may add a bit of layout/chrome around your page.
106
-
107
-
108
-
109
- ## Components
110
-
111
- The following [Container components](/documentation/advanced/understanding/containers) can be used to define the layout of you app.
112
-
113
- * [Row](/documentation/components/layout/row)
114
- * [Column](/documentation/components/layout/column)
115
- * [ColumnsResponsive](/documentation/components/layout/columns_responsive)
116
- * [GridFixed](/documentation/components/layout/gridfixed)
117
- * [GridDraggable](/documentation/components/layout/griddraggable)
118
- * [VBox](/documentation/components/layout/vbox) (kept for ipywidgets compatibility, please use Column)
119
- * [HBox](/documentation/components/layout/hbox) (kept for ipywidgets compatibility, please use Row)
120
- * [AppLayout](/documentation/components/layout/app_layout) Not often used directly, since Solara will already wrap your page in it. Sometimes re-used in a new `Layout` component.
@@ -1,149 +0,0 @@
1
- # Testing with Solara
2
- # Testing Application Logic
3
-
4
- We recommend using pytest to test the application logic of your Solara components. To get inspiration for writing tests that cover component logic and their interactions with existing components, refer to the [tests in the Solara repository](https://github.com/widgetti/solara/tree/master/tests).
5
-
6
- # Testing with a Browser
7
-
8
- If you have custom components that depend on a connected browser because it is using JavaScript, we recommend using the Solara pytest plugin, which is installed by default when you install Solara. The plugin provides a fixture called `solara_test` that you can use to test your components. Here's an example:
9
-
10
- ```python
11
- import ipywidgets as widgets
12
- import playwright.sync_api
13
- from IPython.display import display
14
-
15
- def test_widget_button_solara(solara_test, page_session: playwright.sync_api.Page):
16
- # this all runs in process, which only works with solara
17
- # also, this test is only with pure ipywidgets
18
- button = widgets.Button(description="Click Me!")
19
-
20
- def change_description(obj):
21
- button.description = "Tested event"
22
-
23
- button.on_click(change_description)
24
- display(button)
25
- button_sel = page_session.locator("text=Click Me!")
26
- button_sel.wait_for()
27
- button_sel.click()
28
- page_session.locator("text=Tested event").wait_for()
29
- ```
30
-
31
- Run this test with pytest:
32
-
33
- ```bash
34
- pytest tests/ui/test_widget_button.py --headed # remove --headed to run headless
35
- ```
36
-
37
- This require playwright to be installed:
38
-
39
- ```
40
- $ pip install playwright pytest-playwright
41
- # $ pip install "solara[pytest]" # if you haven't installed solara already
42
- $ playwright install chromium
43
- ```
44
-
45
-
46
- In this example, use the standard IPython display call to add your widget to the page.
47
-
48
- # Testing in the main Jupyter Environments
49
-
50
- In case you want to test your component in the main Jupyter environments (e.g., Jupyter Notebook, Jupyter Lab, Voila, and Solara) to ensure it renders correctly, use the `ipywidgets_runner` fixture to run code snippets. Here's an example:
51
-
52
- ```python
53
- import ipywidgets as widgets
54
- import playwright.sync_api
55
- from IPython.display import display
56
-
57
-
58
- def test_solara_button_all(ipywidgets_runner, page_session: playwright.sync_api.Page, assert_solara_snapshot):
59
- # this function (or rather its lines) will be executed in the kernel
60
- # voila, lab, classic notebook and solara will all execute it
61
- def kernel_code():
62
- import solara
63
-
64
- @solara.component
65
- def Button():
66
- text, set_text = solara.use_state("Click Me!")
67
-
68
- def on_click():
69
- set_text("Tested event")
70
-
71
- solara.Button(text, on_click=on_click)
72
-
73
- display(Button())
74
-
75
- ipywidgets_runner(kernel_code)
76
- button_sel = page_session.locator("button >> text=Click Me!")
77
- assert_solara_snapshot(button_sel.screenshot())
78
- button_sel.wait_for()
79
- button_sel.click()
80
- page_session.locator("button >> text=Tested event").wait_for()
81
- page_session.wait_for_timeout(1000)
82
- ```
83
-
84
- Note that the function in the code will be executed in a different process (a Jupyter kernel), which will make it harder to debug and slower to run.
85
- Because the function code executes in the kernel, you do not have access to local variables. However, by passing a dictionary as second argument
86
- to `ipywidgets_runner` we can pass in extra local variables (e.g. `ipywidgets_runner(kernel_code, {"extra_argument": extra_argument})`).
87
-
88
- ## Limiting the Jupyter Environments
89
- To limit the ipywidgets_runner fixture to only run in a specific environment, use the `SOLARA_TEST_RUNNERS` environment variable:
90
-
91
- * `SOLARA_TEST_RUNNERS=solara pytest tests/ui`
92
- * `SOLARA_TEST_RUNNERS=voila pytest tests/ui`
93
- * `SOLARA_TEST_RUNNERS=jupyter_lab pytest tests/ui`
94
- * `SOLARA_TEST_RUNNERS=jupyter_notebook pytest tests/ui`
95
- * `SOLARA_TEST_RUNNERS=solara,voila pytest tests/ui`
96
-
97
-
98
-
99
- # Organizing Tests and Managing Snapshots
100
- We recommend organizing your visual tests in a separate directory, such as `tests/ui`. This allows you to run fast tests (`test/unit`) separately from slow tests (t`est/ui`). Use the `solara_snapshots_directory` fixture to change the default directory for storing snapshots, which is `tests/ui/snapshots` by default.
101
-
102
- ```bash
103
- $ pytest tests/unit # run fast test
104
- $ pytest tests/ui # run slow test
105
- $ pytest tests # run all tests
106
- ```
107
-
108
- To compare a captured image from a part of your page with the reference image, use the `assert_solara_snapshot` fixture. For example, `assert_solara_snapshot(button_sel.screenshot())` will take a screenshot of the button and compare it to the reference image. If the images are different, the test will fail.
109
-
110
- For local development, you can use the --solara-update-snapshots flag to update the reference images. This will overwrite the existing reference images with the new ones generated during the test run. However, you should carefully review the changes before committing them to your repository to ensure the updates are accurate and expected.
111
-
112
-
113
- # Continuous Integration Recommendations
114
-
115
- When a test fails, the output will be placed in a directory structure similar to what would be put in the `solara_snapshots_directory` directory but under the test-results directory in the root of your project (unless changed by passing `--output=someotherdirectory` to pytest).
116
-
117
- In CI, we recommend downloading this directory using, for example, GitHub Actions:
118
-
119
- ```yaml
120
- - name: Download test results
121
- uses: actions/download-artifact@v2
122
- with:
123
- name: myproject-test-results
124
- path: test-results
125
- ```
126
-
127
-
128
- After inspecting and approving the screenshots, you can copy them to the `solara_snapshots_directory` directory and commit them to your repository. This way, you ensure that the reference images are up-to-date and accurate for future tests.
129
-
130
-
131
- # Note about the Playwright
132
-
133
- Visual testing with solara is based on [Playwright for Python](https://playwright.dev/python/), which provides a `page` fixture. However, this fixture will make a new page for each test, which is not what we want. Therefore, we provide a `page_session` fixture that will reuse the same page for all tests. This is important because it will make the tests faster.
134
-
135
- By following these recommendations and guidelines, you can efficiently test your Solara applications and ensure a smooth developer experience.
136
-
137
- # Configuration
138
-
139
- ## Changing the Hostname
140
-
141
- To configure the hostname the socket is bound to when starting the test server, use the `HOST` or `SOLARA_HOST` environment variable (e.g. `SOLARA_HOST=0.0.0.0`). This hostname is also used for the jupyter server and voila. Alternatively the `--solara-host` argument can be passed on the command line for pytest.
142
-
143
- ## Changing the Port
144
-
145
- To configure the ports the socket is bound to when starting the test servers, use the `PORT` environment variable (e.g. `PORT=18865`). This port and subsequent port will be used for solara-server, jupyter-server and voila. Alternatively the `--solara-port` argument can be passed on the command line for pytest for the solara server, and `--jupyter-port` and `--voila-port` for the ports of jupyter server and voila respectively.
146
-
147
- ## Vuetify warmup
148
-
149
- By default, we insert an ipyvuetify widget with an icon into the frontend to force loading all the vuetify assets, such as CSS and fonts. However, if you are using the solara test plugin to test pure ipywidgets or a 3rd ipywidget based party library you might not need this. Disable this vuetify warmup phase by passing the `--no-solara-vuetify-warmup` argument to pytest, or setting the environment variable `SOLARA_TEST_VUETIFY_WARMUP` to a falsey value (e.g. `SOLARA_TEST_VUETIFY_WARMUP=0`).
@@ -1,66 +0,0 @@
1
-
2
- # Debugging
3
-
4
- ## PDB
5
-
6
- You can use the [python debugger](https://docs.python.org/3/library/pdb.html) to debug your Solara app.
7
-
8
- Simply add `breakpoint()` to your code, and trigger the code, and you will enter the debugger.
9
-
10
- ```python
11
- import solara
12
-
13
- clicks = solara.reactive(0)
14
-
15
-
16
- @solara.component
17
- def Page():
18
- color = "green"
19
- if clicks.value >= 5:
20
- color = "red"
21
-
22
- def increment():
23
- clicks.value += 1
24
- # this will trigger the debugger
25
- breakpoint()
26
- print("clicks", clicks) # noqa
27
-
28
- solara.Button(label=f"Clicked: {clicks}", on_click=increment, color=color)
29
- ```
30
-
31
- ## PyCharm or IntelliJ
32
-
33
- You can also use the debugger of PyCharm or IntelliJ to debug your Solara app.
34
- The following settings works for PyCharm or IntelliJ:
35
-
36
- ![](https://dxhl76zpt6fap.cloudfront.net/public/docs/howto/debugger-intellij.webp)
37
-
38
- ## VSCode
39
-
40
-
41
- In VSCode, you can use the following launch.json to debug your Solara app:
42
-
43
- ```json
44
- {
45
- // Use IntelliSense to learn about possible attributes.
46
- // Hover to view descriptions of existing attributes.
47
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
48
- "version": "0.2.0",
49
- "configurations": [
50
- {
51
- "name": "Solara: Launch",
52
- "type": "python",
53
- "request": "launch",
54
- "program": "/Users/maartenbreddels/miniconda3/envs/dev/bin/solara",
55
- "args": [
56
- "run",
57
- "${file}"
58
- ],
59
- "console": "integratedTerminal",
60
- "justMyCode": true,
61
- }
62
- ]
63
- }
64
- ```
65
-
66
- Now keep your script tab open, and press F5 to start debugging (or click the play icon in the UI).
@@ -1,43 +0,0 @@
1
- # Embedding in existing websites
2
-
3
- Solara can be embedded into existing websites. Although it is technically possible to embed a Solara app into an existing webpage, we currently support embedding primarily via iframes.
4
-
5
-
6
- ## Embed via iframe
7
-
8
- Here we demonstrate how to embed Solara into an existing webpage via an iframe. Let's start by creating a simple HTML page (here we choose the filename embed.html):
9
-
10
- ```html
11
- <html>
12
- <body>
13
- <h1>This is on the main page</h1>
14
- <iframe src="http://localhost:8765" width="100%" height="100%"></iframe>
15
- </body>
16
- </html>
17
- ```
18
-
19
- Now, start an http server (in this example we use the standard Python http server):
20
- ```bash
21
- $ python -m http.server
22
- Serving HTTP on :: port 8000 (http://[::]:8000/) ...
23
- ```
24
-
25
- Additionally, start the Solara server:
26
-
27
- ```bash
28
- $ solara run my-solara-app.py
29
- Solara server is starting at http://localhost:8765
30
- ```
31
-
32
- Ensure the port number matches that of the iframe in `embed.html`. Now open `http://localhost:8000/embed.html` in your browser, and you should see the Solara app embedded in the page.
33
-
34
- If you do not see your app, you can open the browser developer tools in your browser and look for errors in the console. If you use the Brave browser, you might want to disable the Brave shields for your local server.
35
-
36
- ### Security considerations
37
-
38
- Solara uses a cookie to implement sessions. To support cookies settings in an iframe, we set the session cookie using `Secure`, and `SameSite=Strict`. See [https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies](MDN) for more details. This means that we can only support loading via iframes via https or localhost.
39
-
40
-
41
- ## Embed into an existing page
42
-
43
- If embedding into an iframe does not suit your needs (for example, dialogs not being fullscreen), [please contact us](/contact) and we can discuss other options.