solara 1.29.1__py2.py3-none-any.whl → 1.30.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.
- solara/__init__.py +5 -5
- solara/__main__.py +6 -2
- solara/autorouting.py +79 -38
- solara/cache.py +2 -2
- solara/checks.html +1 -1
- solara/components/__init__.py +1 -1
- solara/components/applayout.py +5 -5
- solara/components/button.py +4 -4
- solara/components/card.py +1 -2
- solara/components/component_vue.py +1 -1
- solara/components/cross_filter.py +6 -7
- solara/components/datatable.py +2 -3
- solara/components/figure_altair.py +1 -1
- solara/components/file_download.py +2 -2
- solara/components/file_drop.py +76 -33
- solara/components/file_drop.vue +24 -10
- solara/components/head.py +1 -2
- solara/components/head_tag.py +2 -3
- solara/components/link.py +3 -4
- solara/components/meta.py +1 -1
- solara/components/misc.py +5 -9
- solara/datatypes.py +2 -2
- solara/hooks/use_reactive.py +2 -2
- solara/lab/components/confirmation_dialog.py +1 -1
- solara/lab/components/tabs.py +6 -6
- solara/reactive.py +1 -1
- solara/routing.py +9 -8
- solara/server/app.py +44 -1
- solara/server/assets/style.css +6 -0
- solara/server/esm.py +28 -4
- solara/server/kernel_context.py +75 -7
- solara/server/patch.py +3 -0
- solara/server/reload.py +2 -2
- solara/server/server.py +3 -3
- solara/server/settings.py +1 -0
- solara/server/starlette.py +66 -33
- solara/server/static/solara_bootstrap.py +1 -1
- solara/server/templates/solara.html.j2 +62 -42
- solara/tasks.py +1 -6
- solara/util.py +23 -1
- solara/website/assets/custom.css +56 -0
- solara/website/components/__init__.py +1 -0
- solara/website/components/algolia_api.vue +157 -0
- solara/website/components/docs.py +118 -0
- solara/website/components/header.py +20 -10
- solara/website/components/hero.py +1 -1
- solara/website/pages/__init__.py +223 -20
- solara/website/pages/apps/jupyter-dashboard-1.py +1 -1
- solara/website/pages/apps/multipage/__init__.py +1 -1
- solara/website/pages/apps/multipage/page2.py +1 -1
- solara/website/pages/apps/scatter.py +21 -7
- solara/website/pages/changelog/__init__.py +8 -0
- solara/website/pages/{docs/content/95-changelog.md → changelog/changelog.md} +28 -2
- solara/website/pages/contact/__init__.py +8 -0
- solara/website/pages/documentation/__init__.py +184 -0
- solara/website/pages/documentation/advanced/__init__.py +36 -0
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +4 -5
- solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +21 -21
- solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +2 -2
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +3 -3
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +9 -9
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +1 -1
- solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +3 -3
- solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +5 -5
- solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +2 -2
- solara/website/pages/documentation/advanced/content/__init__.py +0 -0
- solara/website/pages/documentation/api/__init__.py +19 -0
- solara/website/pages/documentation/api/cross_filter/__init__.py +9 -0
- solara/website/pages/documentation/api/hooks/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/hooks}/use_effect.md +3 -3
- solara/website/pages/{api → documentation/api/hooks}/use_effect.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_memo.md +2 -2
- solara/website/pages/{api → documentation/api/hooks}/use_memo.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_reactive.py +1 -2
- solara/website/pages/{api → documentation/api/hooks}/use_state.py +1 -2
- solara/website/pages/documentation/api/routing/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/routing}/generate_routes.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/generate_routes_directory.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/use_route.py +2 -2
- solara/website/pages/{api → documentation/api/routing}/use_router.py +1 -2
- solara/website/pages/documentation/api/utilities/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/utilities}/component_vue.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/computed.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/display.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/get_kernel_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/get_session_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/on_kernel_start.py +9 -3
- solara/website/pages/{api → documentation/api/utilities}/reactive.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/widget.py +2 -2
- solara/website/pages/documentation/components/__init__.py +12 -0
- solara/website/pages/documentation/components/advanced/__init__.py +9 -0
- solara/website/pages/documentation/components/data/__init__.py +9 -0
- solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/enterprise}/avatar.py +1 -2
- solara/website/pages/{api → documentation/components/enterprise}/avatar_menu.py +1 -2
- solara/website/pages/documentation/components/input/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/input}/checkbox.py +1 -2
- solara/website/pages/documentation/components/input/file_drop.py +75 -0
- solara/website/pages/{api → documentation/components/input}/input.py +1 -2
- solara/website/pages/{api → documentation/components/input}/select.py +1 -2
- solara/website/pages/{api → documentation/components/input}/slider.py +1 -2
- solara/website/pages/{api → documentation/components/input}/switch.py +1 -2
- solara/website/pages/{api → documentation/components/input}/togglebuttons.py +1 -2
- solara/website/pages/documentation/components/lab/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/lab}/chat.py +2 -3
- solara/website/pages/{api → documentation/components/lab}/cookies_headers.py +1 -1
- solara/website/pages/{api → documentation/components/lab}/input_date.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/menu.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/task.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/theming.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/use_task.py +1 -2
- solara/website/pages/documentation/components/layout/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/layout}/app_bar.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/app_bar_title.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card_actions.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/griddraggable.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/gridfixed.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/hbox.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/vbox.py +1 -1
- solara/website/pages/documentation/components/output/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/output}/file_download.py +1 -2
- solara/website/pages/{api → documentation/components/output}/image.py +1 -2
- solara/website/pages/{api → documentation/components/output}/tooltip.py +1 -2
- solara/website/pages/documentation/components/page/__init__.py +9 -0
- solara/website/pages/documentation/components/status/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/status}/error.py +3 -3
- solara/website/pages/{api → documentation/components/status}/info.py +3 -3
- solara/website/pages/{api → documentation/components/status}/progress.py +1 -2
- solara/website/pages/{api → documentation/components/status}/spinner.py +1 -2
- solara/website/pages/{api → documentation/components/status}/success.py +3 -3
- solara/website/pages/{api → documentation/components/status}/warning.py +3 -3
- solara/website/pages/documentation/components/viz/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/viz}/plotly.py +1 -0
- solara/website/pages/{examples → documentation/examples}/__init__.py +3 -43
- solara/website/pages/{examples → documentation/examples}/general/deploy_model.py +3 -3
- solara/website/pages/{examples → documentation/examples}/general/login_oauth.py +1 -1
- solara/website/pages/{examples → documentation/examples}/general/vue_component.py +1 -2
- solara/website/pages/{examples → documentation/examples}/libraries/altair.py +2 -3
- solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet_advanced.py +1 -1
- solara/website/pages/{examples → documentation/examples}/utilities/countdown_timer.py +1 -1
- solara/website/pages/{examples → documentation/examples}/visualization/plotly.py +1 -2
- solara/website/pages/documentation/faq/__init__.py +11 -0
- solara/website/pages/{docs → documentation/getting_started}/__init__.py +7 -1
- solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +2 -2
- solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +16 -16
- solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +1 -1
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +9 -0
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +4 -4
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +9 -9
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +13 -13
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +3 -3
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_data_science.ipynb +5 -5
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +7 -0
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +2 -2
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +3 -3
- solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +3 -0
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +3 -3
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +1 -1
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +3 -0
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +3 -3
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +1 -1
- solara/website/pages/documentation/getting_started/content/__init__.py +0 -0
- solara/website/pages/showcase/__init__.py +1 -1
- solara/website/pages/showcase/domino_code_assist.py +1 -1
- solara/website/pages/showcase/solara_dev.py +1 -1
- solara/website/public/social/discord.svg +1 -0
- solara/website/public/social/github.svg +1 -0
- solara/website/public/social/twitter.svg +3 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/METADATA +8 -7
- solara-1.30.0.dist-info/RECORD +438 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/WHEEL +1 -1
- solara/website/pages/api/__init__.py +0 -292
- solara/website/pages/api/default_layout.py +0 -16
- solara/website/pages/api/file_drop.py +0 -36
- solara/website/pages/docs/content/04-tutorial/00-overview.md +0 -9
- solara/website/pages/docs/content/07-fundamentals/00-overview.md +0 -7
- solara/website/pages/docs/content/15-reference/00-overview.md +0 -6
- solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
- solara-1.29.1.dist-info/RECORD +0 -411
- /solara/website/pages/{docs/content/99-contact.md → contact/contact.md} +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +0 -0
- /solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/00-introduction.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/17-rules-of-hooks.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +0 -0
- /solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/00-overview.md +0 -0
- /solara/website/pages/{docs/content/__init__.py → documentation/advanced/content/40-development/00-overview.md} +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_dataframe.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_report.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_select.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_slider.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_cross_filter.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_dark_effective.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_exception.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_previous.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_state_or_update.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.md +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_trait_observe.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/resolve_path.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/route.py +0 -0
- /solara/website/pages/{api → documentation/api/utilities}/memoize.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/link.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/meta.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/style.py +0 -0
- /solara/website/pages/{api → documentation/components}/common.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/dataframe.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/pivot_table.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/button.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/file_browser.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/confirmation_dialog.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tab.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tabs.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/app_layout.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/column.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns_responsive.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/row.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/sidebar.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/html.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown_editor.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/sql_code.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/head.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/title.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/altair.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/echarts.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/matplotlib.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/plotly_express.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/chatbot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/tokenizer.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/sine.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/authorization.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/layout_demo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/multipage.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scatter.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scrolling.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/tutorial_streamlit.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/custom_storage.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/live_update.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/mycard.vue +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/pokemon_search.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ipycanvas.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/bqplot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/calculator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/todo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/annotator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/linked_views.py +0 -0
- /solara/website/pages/{docs → documentation/faq}/content/99-faq.md +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/10_data_science.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/60-jupyter-dashboard-part1.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/SF_crime_sample.csv.gz +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_jupyter_dashboard_1.ipynb +0 -0
- /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +0 -0
- /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +0 -0
- /solara/website/pages/{docs/content/lab → documentation/getting_started/content/08-lab}/00-what-is-lab.md +0 -0
- /solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/entry_points.txt +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,7 +5,7 @@ In this tutorial, you will learn how to use Solara to create a tiny web app usin
|
|
|
5
5
|
## You should know
|
|
6
6
|
This tutorial will assume you have successfully installed Solara.
|
|
7
7
|
|
|
8
|
-
If not, please follow the [Installation guide](/
|
|
8
|
+
If not, please follow the [Installation guide](/documentation/getting_started/installing).
|
|
9
9
|
|
|
10
10
|
## Generate a script file
|
|
11
11
|
The simplest way to get started is to run the command
|
|
@@ -40,7 +40,7 @@ def Page():
|
|
|
40
40
|
|
|
41
41
|
## Run the script
|
|
42
42
|
|
|
43
|
-
Using [Solara server](/
|
|
43
|
+
Using [Solara server](/documentation/advanced/understanding/solara-server), we can now run our Python script using:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
$ solara run sol.py
|
|
@@ -50,7 +50,7 @@ Solara server is starting at http://localhost:8765
|
|
|
50
50
|
If you open the URL in your browser ([or click here](http://localhost:8765)), you should see the same example as above.
|
|
51
51
|
|
|
52
52
|
Solara will run your script once, and will look for the `Page` component. Solara expects this component to exist
|
|
53
|
-
and be a [Reacton](/
|
|
53
|
+
and be a [Reacton](/documentation/advanced/understanding/reacton) component. (See the [IPywidget tutorial](/documentation/getting_started/tutorials/ipywidgets) to learn how to render a regular ipywidget).
|
|
54
54
|
|
|
55
55
|
Since your script is only run once, you could put in the main body of your script code that only needs to run once (e.g. loading data from disk)
|
|
56
56
|
|
|
@@ -68,7 +68,7 @@ Lets modify the script a little bit, possibly in this way:
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
If we save the script, Solara will automatically reload your script and update
|
|
71
|
-
your browser (we call this feature [hot reloading](/
|
|
71
|
+
your browser (we call this feature [hot reloading](/documentation/getting_started/reference/reloading)).
|
|
72
72
|
|
|
73
73
|
Note that Solara will remember your state (e.g., the number of buttons clicked) when the app reloads.
|
|
74
74
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Tutorial: IPywidgets
|
|
2
2
|
|
|
3
|
-
If you are already using [ipywidgets](/
|
|
4
|
-
can also use the [Solara server](/
|
|
3
|
+
If you are already using [ipywidgets](/documentation/advanced/understanding/ipywidgets) in the notebook, possibly using [Voila](/documentation/advanced/understanding/voila), you might be pleased to know that you
|
|
4
|
+
can also use the [Solara server](/documentation/advanced/understanding/solara-server) to render your regular ipywidget application.
|
|
5
5
|
|
|
6
|
-
We recommend you learn how to write applications using [Reacton](/
|
|
7
|
-
pure [ipywidgets](/
|
|
6
|
+
We recommend you learn how to write applications using [Reacton](/documentation/advanced/understanding/reacton). However, if you have already written an application in
|
|
7
|
+
pure [ipywidgets](/documentation/advanced/understanding/ipywidgets), this approach will let you gradually move from pure ipywidgets to Reacton.
|
|
8
8
|
|
|
9
9
|
## You should know
|
|
10
10
|
This tutorial will assume you have successfully installed Solara.
|
|
11
11
|
|
|
12
|
-
If not, please follow the [Installation guide](/
|
|
12
|
+
If not, please follow the [Installation guide](/documentation/getting_started/installing).
|
|
13
13
|
|
|
14
14
|
## Your first ipywidget based Solara app
|
|
15
15
|
|
|
@@ -70,10 +70,10 @@ Try making the following code change (remove the first, add the last), and watch
|
|
|
70
70
|
|
|
71
71
|
## Using Solara components
|
|
72
72
|
|
|
73
|
-
There are a lot of [valuable components in Solara](/
|
|
73
|
+
There are a lot of [valuable components in Solara](/documentation/components), but they are written as [Reacton/Solara components](/documentation/advanced/understanding/reacton-basics), not
|
|
74
74
|
classic ipywidgets.
|
|
75
75
|
|
|
76
|
-
Use the [.widget(...)](/api/widget) method on a component to create a widget that can be used in your existing classic ipywidget application.
|
|
76
|
+
Use the [.widget(...)](/documentation/api/utilities/widget) method on a component to create a widget that can be used in your existing classic ipywidget application.
|
|
77
77
|
|
|
78
78
|
```python
|
|
79
79
|
|
|
@@ -111,10 +111,10 @@ Note that we did not include the `:page` here, since solara will automatically l
|
|
|
111
111
|
|
|
112
112
|
## What you have learned
|
|
113
113
|
|
|
114
|
-
* [Solara server](/
|
|
114
|
+
* [Solara server](/documentation/advanced/understanding/solara-server) can render [ipywidgets](/documentation/advanced/understanding/ipywidgets).
|
|
115
115
|
* Running `$ solara run filename.py:variablename` tells Solara which script to execute and which variable name from the script to render.
|
|
116
116
|
* The script is executed:
|
|
117
117
|
* Once, when the solara server starts.
|
|
118
118
|
* On each page request.
|
|
119
119
|
* For each open browser page/tab, when the script is saved (hot reloading).
|
|
120
|
-
* Using the [.widget(...)](/api/widget) method we can start using Solara components in classic ipywidget app.
|
|
120
|
+
* Using the [.widget(...)](/documentation/api/utilities/widget) method we can start using Solara components in classic ipywidget app.
|
|
@@ -18,8 +18,8 @@ st.markdown(f"{x} squared = {x_squared}")
|
|
|
18
18
|
|
|
19
19
|
## Translated to Solara
|
|
20
20
|
|
|
21
|
-
We now translate this to the equivalent in Solara. The largest difference is we need to explicitly create (application) state using [`solara.reactive`](/api/reactive). By passing the
|
|
22
|
-
reactive variable to the [SliderInt](/
|
|
21
|
+
We now translate this to the equivalent in Solara. The largest difference is we need to explicitly create (application) state using [`solara.reactive`](/documentation/api/utilities/reactive). By passing the
|
|
22
|
+
reactive variable to the [SliderInt](/documentation/components/input/slider) via `value=x` we set up a two way binding between the component and the reactive variable. The generated text is passed down to the [Markdown](/documentation/components/output/markdown) component.
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
```solara
|
|
@@ -49,7 +49,7 @@ You will see:
|
|
|
49
49
|
|
|
50
50
|
Because we do some styling and because the sidebar is already used up, our preview on this page looks slightly different.
|
|
51
51
|
|
|
52
|
-
[Navigate to /apps/tutorial-streamlit](/
|
|
52
|
+
[Navigate to /apps/tutorial-streamlit](/documentation/examples/fullscreen/tutorial_streamlit) to see this app fullscreen.
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
### Running this example in the notebook
|
|
@@ -61,7 +61,7 @@ Again, slightly different for a different environment.
|
|
|
61
61
|
|
|
62
62
|
## Hot reloading
|
|
63
63
|
|
|
64
|
-
If you are using [Solara server](/
|
|
64
|
+
If you are using [Solara server](/documentation/advanced/understanding/solara-server), try editing `sol.py`, and watch the page reload automatically after you save your file. Notebook users can simply edit and re-run.
|
|
65
65
|
|
|
66
66
|
(*Note: Upgrade to solara 1.14.0 for a fix in hot reloading using `pip install "solara>=1.14.0"`*)
|
|
67
67
|
|
|
@@ -69,13 +69,13 @@ If you are using [Solara server](/docs/understanding/solara-server), try editing
|
|
|
69
69
|
|
|
70
70
|
### Execution model
|
|
71
71
|
As the introduction says, Solara does not re-execute your whole script after user interactions.
|
|
72
|
-
The main script is executed only once. With Solara you can use your main script to read large dataframes, or do some pre-calculations without the need for [caching](/
|
|
72
|
+
The main script is executed only once. With Solara you can use your main script to read large dataframes, or do some pre-calculations without the need for [caching](/documentation/getting_started/reference/caching).
|
|
73
73
|
|
|
74
|
-
When a user navigates to a Solara server, the `Page` component (basically a function) will get executed. The `Page` component will call (lazily) new components like [solara.Markdown](/
|
|
74
|
+
When a user navigates to a Solara server, the `Page` component (basically a function) will get executed. The `Page` component will call (lazily) new components like [solara.Markdown](/documentation/components/output/markdown) to build up the page. If state changes due to user input, Solara will trigger a cascade of re-excecutions of components which inputs or state changed, but never your whole script, nor every component.
|
|
75
75
|
|
|
76
76
|
### State
|
|
77
|
-
With Solara (and [Reacton](/
|
|
78
|
-
similarly as in the example: [First use_state and other hooks, then calculations, at last the UI components](/
|
|
77
|
+
With Solara (and [Reacton](/documentation/advanced/understanding/reacton)) state does not live in a UI component (like a slider). Application state created with [`solara.reactive`](/documentation/api/utilities/reactive) lives on its own. Connecting the state to the UI component (in this case a slider) is a separate step, done via `value=x` in the above example. In general we recommend organising your components
|
|
78
|
+
similarly as in the example: [First use_state and other hooks, then calculations, at last the UI components](/documentation/advanced/understanding/anatomy).
|
|
79
79
|
|
|
80
80
|
For complex situations, it is important to separate the state and the UI. Especially when you need the state of a UI component as input of the UI component itself, you can get stuck with streamlit. In Solara this follows naturally.
|
|
81
81
|
|
|
@@ -83,8 +83,8 @@ For complex situations, it is important to separate the state and the UI. Especi
|
|
|
83
83
|
## Creating a reusable component
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
A big advantage of Solara is that you can create reusable components. A single component can be seen as the equivalent of a single streamlit script. However, in that case, we need to modify our component to have its own state, rather than using global application state, for this you can use the [`use_reactive`](/api/use_reactive), or [`use_state`](/api/use_state) hook.
|
|
87
|
-
Read more about state management in the [state management](/
|
|
86
|
+
A big advantage of Solara is that you can create reusable components. A single component can be seen as the equivalent of a single streamlit script. However, in that case, we need to modify our component to have its own state, rather than using global application state, for this you can use the [`use_reactive`](/documentation/api/hooks/use_reactive), or [`use_state`](/documentation/api/hooks/use_state) hook.
|
|
87
|
+
Read more about state management in the [state management](/documentation/getting_started/fundamentals/state-management) section.
|
|
88
88
|
|
|
89
89
|
```solara
|
|
90
90
|
import solara
|
|
@@ -129,8 +129,8 @@ Changing that "y" to "x" will lead to an error, however. If this is a problem in
|
|
|
129
129
|
|
|
130
130
|
### Long running function
|
|
131
131
|
|
|
132
|
-
In Streamlit, it is normal for your main script to block execution. In Solara, the functions bodies of your components ([called render functions](/
|
|
133
|
-
[use_thread](/api/use_thread) hook will help a lot.
|
|
132
|
+
In Streamlit, it is normal for your main script to block execution. In Solara, the functions bodies of your components ([called render functions](/documentation/advanced/understanding/anatomy)) should not block. Functions that block, or take a long time to execute, should be executed in a thread, such that rendering can continue. Using threads may sound scary, but using the
|
|
133
|
+
[use_thread](/documentation/api/hooks/use_thread) hook will help a lot.
|
|
134
134
|
|
|
135
135
|
## What you have learned
|
|
136
136
|
|
|
@@ -138,4 +138,4 @@ In Streamlit, it is normal for your main script to block execution. In Solara, t
|
|
|
138
138
|
* Solara will re-execute components instead, only what needs to.
|
|
139
139
|
* State in Solara is separate from the UI components, unlike streamlit, where they are strongly linked.
|
|
140
140
|
* State can be on the application level (global) for simplicity or on the component level (local) for creating reusable components.
|
|
141
|
-
* Solara should not block the render loop. Long-running functions should be executed in a thread using [use_thread](/api/use_thread).
|
|
141
|
+
* Solara should not block the render loop. Long-running functions should be executed in a thread using [use_thread](/documentation/api/hooks/use_thread).
|
|
@@ -36,7 +36,7 @@ This small app creates a dropdown (what we call Select in Solara), and some mark
|
|
|
36
36
|
|
|
37
37
|
## Translated to Solara
|
|
38
38
|
|
|
39
|
-
In Solara, we need to explicitly create application state using [`solara.reactive`](/api/reactive). We wire this up with the [Select][/
|
|
39
|
+
In Solara, we need to explicitly create application state using [`solara.reactive`](/documentation/api/utilities/reactive). We wire this up with the [Select][/documentation/components/input/select] via `value=color` and pass the color value down to the [Markdown](/documentation/components/output/markdown) component.
|
|
40
40
|
|
|
41
41
|
```solara
|
|
42
42
|
import solara
|
|
@@ -50,7 +50,7 @@ def Page():
|
|
|
50
50
|
solara.Markdown("## Hello World", style={"color": color.value})
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Since this component combines two components, we have to put them together in a [container](/
|
|
53
|
+
Since this component combines two components, we have to put them together in a [container](/documentation/advanced/understanding/containers) component, here implicitly a [Column](/documentation/components/layout/column).
|
|
54
54
|
|
|
55
55
|
## Making a re-usable component
|
|
56
56
|
|
|
@@ -115,7 +115,7 @@ if __name__ == "__main__":
|
|
|
115
115
|
|
|
116
116
|
### In Solara
|
|
117
117
|
|
|
118
|
-
A big advantage of Solara is that components are reusable by default. However, we need to modify our component to have its own state, rather than using global application state. Creating local component state with [`use_reactive`](/api/use_reactive), or [`use_state`](/api/use_state) hook. Read more about state management in the [state management](/
|
|
118
|
+
A big advantage of Solara is that components are reusable by default. However, we need to modify our component to have its own state, rather than using global application state. Creating local component state with [`use_reactive`](/documentation/api/hooks/use_reactive), or [`use_state`](/documentation/api/hooks/use_state) hook. Read more about state management in the [state management](/documentation/getting_started/fundamentals/state-management) section.
|
|
119
119
|
|
|
120
120
|
We will rename (from `Page` to `MarkdownWithColor`) the component, add local state, and put in the markdown text as an argument.
|
|
121
121
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
" * You have successfully installed Solara\n",
|
|
17
17
|
" * You know how to display a Solara component in a notebook or script\n",
|
|
18
18
|
"\n",
|
|
19
|
-
"If not, please follow the [Quick start](/
|
|
19
|
+
"If not, please follow the [Quick start](/documentation/getting_started).\n",
|
|
20
20
|
"\n",
|
|
21
21
|
"## Extra packages you need to install\n",
|
|
22
22
|
"\n",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"fig = px.scatter(df, \"sepal_length\", \"sepal_width\")\n",
|
|
86
86
|
"```\n",
|
|
87
87
|
"\n",
|
|
88
|
-
"To display this figure in a Solara component, we should return an element that can render the plotly figure. [FigurePlotly](/
|
|
88
|
+
"To display this figure in a Solara component, we should return an element that can render the plotly figure. [FigurePlotly](/documentation/components/viz/plotly) will do the job for us.\n",
|
|
89
89
|
"\n",
|
|
90
90
|
"Putting this together"
|
|
91
91
|
]
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"x_axis = solara.reactive(\"sepal_length\")\n",
|
|
134
134
|
"```\n",
|
|
135
135
|
"\n",
|
|
136
|
-
"This code creates a reactive variable. You can use this reactive variable in your component and pass it to a [`Select`](
|
|
136
|
+
"This code creates a reactive variable. You can use this reactive variable in your component and pass it to a [`Select`](/documentation/components/input/select) component to control the selected column.\n",
|
|
137
137
|
"\n",
|
|
138
138
|
"\n",
|
|
139
139
|
"```python\n",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"\n",
|
|
197
197
|
"#### State\n",
|
|
198
198
|
"\n",
|
|
199
|
-
"Understanding state management and how Solara re-renders component is crucial for understanding building larger applications. If you don't fully graps it now, that is ok. You should first get used to the pattern, and consider reading [About state management](/
|
|
199
|
+
"Understanding state management and how Solara re-renders component is crucial for understanding building larger applications. If you don't fully graps it now, that is ok. You should first get used to the pattern, and consider reading [About state management](/documentation/getting_started/fundamentals/state-management) later on to get a deeper understanding.\n",
|
|
200
200
|
"\n"
|
|
201
201
|
]
|
|
202
202
|
},
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
" return df.sort_values('distance')[1:n+1]\n",
|
|
359
359
|
"```\n",
|
|
360
360
|
"\n",
|
|
361
|
-
"We now only find the nearest neighbours if `click_data.value` is not None, and display the dataframe using the [`DataFrame`](/
|
|
361
|
+
"We now only find the nearest neighbours if `click_data.value` is not None, and display the dataframe using the [`DataFrame`](/documentation/components/data/dataframe) component.\n"
|
|
362
362
|
]
|
|
363
363
|
},
|
|
364
364
|
{
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Fundamentals
|
|
2
|
+
|
|
3
|
+
If you want to dive deeper into Solara, this section is for you. We will cover the following topics:
|
|
4
|
+
|
|
5
|
+
* [Components](/documentation/getting_started/fundamentals/components)
|
|
6
|
+
* Hooks (soon)
|
|
7
|
+
* [State management](/documentation/getting_started/fundamentals/state-management)
|
|
@@ -19,9 +19,9 @@ In Solara, there are two main types of components: Widget Components and Functio
|
|
|
19
19
|
|
|
20
20
|
Widget Components correspond to ipywidgets and are responsible for rendering visual elements in the browser, such as buttons, sliders, or performing layout tasks. These components are the foundation of your user interface and provide the essential building blocks for creating interactive applications.
|
|
21
21
|
|
|
22
|
-
Solara mainly uses the [ipyvuetify library](/
|
|
22
|
+
Solara mainly uses the [ipyvuetify library](/documentation/advanced/understanding/ipyvuetify) for its widget components. It provides a set of high-level components that can be used to create rich, interactive user interfaces.
|
|
23
23
|
|
|
24
|
-
See the [
|
|
24
|
+
See the [components page](/documentation/components) for a complete list of basic UI components.
|
|
25
25
|
|
|
26
26
|
## Function Components
|
|
27
27
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Introduction
|
|
2
2
|
|
|
3
|
-
State management is a crucial aspect of building data-focused web applications with Solara. By effectively managing state, you can create interactive and responsive applications that react to changes in data and user input. In Solara, there are two primary ways to define state: global application state using [`solara.reactive`](/api/reactive) and local component state using [`solara.use_state`](/api/use_state) or [`solara.use_reactive`](/api/use_reactive). This article will discuss these two approaches and provide examples of how to use them in your Solara applications.
|
|
3
|
+
State management is a crucial aspect of building data-focused web applications with Solara. By effectively managing state, you can create interactive and responsive applications that react to changes in data and user input. In Solara, there are two primary ways to define state: global application state using [`solara.reactive`](/documentation/api/utilities/reactive) and local component state using [`solara.use_state`](/documentation/api/hooks/use_state) or [`solara.use_reactive`](/documentation/api/hooks/use_reactive). This article will discuss these two approaches and provide examples of how to use them in your Solara applications.
|
|
4
4
|
|
|
5
5
|
## Two main ways of defining state in Solara
|
|
6
6
|
|
|
7
7
|
### Global application state using solara.reactive
|
|
8
8
|
|
|
9
|
-
Using [`solara.reactive`](/api/reactive) allows you to create global state variables that can be accessed and modified from any component within your application. This approach is useful when you need to manage state that is shared across multiple components or when you want to maintain consistency throughout your application.
|
|
9
|
+
Using [`solara.reactive`](/documentation/api/utilities/reactive) allows you to create global state variables that can be accessed and modified from any component within your application. This approach is useful when you need to manage state that is shared across multiple components or when you want to maintain consistency throughout your application.
|
|
10
10
|
|
|
11
11
|
Example:
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ In this case, the `SomeAppSpecificComponent` is not reusable in the sense that a
|
|
|
30
30
|
|
|
31
31
|
## Local component state using solara.use_state
|
|
32
32
|
|
|
33
|
-
[`solara.use_state`](/api/use_state) is a hook that allows you to manage local state within a specific component. This approach is beneficial when you want to encapsulate state within a component, making it self-contained and modular. Local state management is suitable for situations where state changes only affect the component and do not need to be shared across the application.
|
|
33
|
+
[`solara.use_state`](/documentation/api/hooks/use_state) is a hook that allows you to manage local state within a specific component. This approach is beneficial when you want to encapsulate state within a component, making it self-contained and modular. Local state management is suitable for situations where state changes only affect the component and do not need to be shared across the application.
|
|
34
34
|
|
|
35
35
|
Example:
|
|
36
36
|
```solara
|
|
@@ -29,4 +29,4 @@ All assets files are served under `/static/assets/<filename>`, but how the asset
|
|
|
29
29
|
Putting the `assets` directory 1 level higher than the `pages` directory avoids name collision with pages.
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
Although the `assets` directory can be used for serving arbitrary files, we recommend using the [static files](/
|
|
32
|
+
Although the `assets` directory can be used for serving arbitrary files, we recommend using the [static files](/documentation/getting_started/reference/static-files) directory instead, to avoid name collisions.
|
|
@@ -29,7 +29,7 @@ Using the command
|
|
|
29
29
|
$ solara ssg your.awesome.app
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Will run the solara server and use playwright to fetch all known pages and save them to the `../build` directory. Solara knows about your pages because of its [routing support](/
|
|
32
|
+
Will run the solara server and use playwright to fetch all known pages and save them to the `../build` directory. Solara knows about your pages because of its [routing support](/documentation/advanced/understanding/routing).
|
|
33
33
|
|
|
34
34
|
All HTML files in the `../build` will be used to pre-populate the HTML served to the user.
|
|
35
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Search
|
|
2
2
|
|
|
3
|
-
Solara can provide search, if [SSG](/
|
|
3
|
+
Solara can provide search, if [SSG](/documentation/getting_started/reference/static-site-generation) is enabled. This allows you to add a search box to you website, which performs a full-text search to provide quick access to pages. The solara website itself uses the
|
|
4
4
|
search feature as well in the toolbar.
|
|
5
5
|
|
|
6
6
|
## Using Solara's Search feature.
|
|
@@ -13,18 +13,18 @@ When a `.vue` file is saved, the widgets get updated automatically, without need
|
|
|
13
13
|
|
|
14
14
|
## Reloading of .vue files
|
|
15
15
|
|
|
16
|
-
The [Style component](/
|
|
16
|
+
The [Style component](/documentation/components/advanced/style) accepts a Path as argument, when that is used and the server is in development mode (the default), also
|
|
17
17
|
CSS files will be hot reloaded.
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
## Restarting the server after changes to the solara packages
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
You don't need to care about this feature if you only use solara, this is only relevant for development on solara itself, [see also development instructions](/
|
|
23
|
+
You don't need to care about this feature if you only use solara, this is only relevant for development on solara itself, [see also development instructions](/documentation/advanced/development/setup).
|
|
24
24
|
|
|
25
25
|
If the `--auto-restart/-a` flag is passed to solara-server and any changes occur in the `solara` package (excluding `solara.webpage`), solara-server will restart. This speeds up development on `solara-server` for developers since you do not
|
|
26
26
|
need to manually restart the server in the terminal.
|
|
27
27
|
|
|
28
28
|
## Disabling reloading
|
|
29
29
|
|
|
30
|
-
In production mode (pass the `--production` argument to `solara run`) watching of files is disabled, and no reloading of files or vue templates will occur. If you run solara integrated in flask or uvicorn as laid out in [deployment documentation](https://solara.dev/
|
|
30
|
+
In production mode (pass the `--production` argument to `solara run`) watching of files is disabled, and no reloading of files or vue templates will occur. If you run solara integrated in flask or uvicorn as laid out in [deployment documentation](https://solara.dev/documentation/getting_started/deploying/self-hosted)
|
|
@@ -11,7 +11,7 @@ assert "my-key" in solara.cache.storage
|
|
|
11
11
|
|
|
12
12
|
Note that at any time later on, the key may be removed from this object, as a cache always has a limited capacity.
|
|
13
13
|
|
|
14
|
-
The `solara.cache.storage` cache object is used by [memoize](/api/memoize), if no storage argument is passed to this decorator.
|
|
14
|
+
The `solara.cache.storage` cache object is used by [memoize](/documentation/api/utilities/memoize), if no storage argument is passed to this decorator.
|
|
15
15
|
|
|
16
16
|
## Types of cache
|
|
17
17
|
|
|
@@ -48,7 +48,7 @@ Instead, start your chosen web framework as directed by their documentation and
|
|
|
48
48
|
$ export SOLARA_APP=sol.py
|
|
49
49
|
# run flask or starlette
|
|
50
50
|
|
|
51
|
-
or look at the examples below for more detailed instructions per web framework. Note that when solara is used this way it [by default runs in production mode](https://solara.dev/
|
|
51
|
+
or look at the examples below for more detailed instructions per web framework. Note that when solara is used this way it [by default runs in production mode](https://solara.dev/documentation/advanced/understanding/solara-server).
|
|
52
52
|
|
|
53
53
|
## Flask
|
|
54
54
|
|
|
@@ -180,7 +180,7 @@ display(element)
|
|
|
180
180
|
|
|
181
181
|
Or consider using [Voila-vuetify](https://github.com/voila-dashboards/voila-vuetify).
|
|
182
182
|
|
|
183
|
-
Solara apps in Voila do not have support for [routing](/
|
|
183
|
+
Solara apps in Voila do not have support for [routing](/documentation/advanced/understanding/routing)/[multipage](/documentation/advanced/howto/multipage).
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
## Panel
|
|
@@ -211,7 +211,7 @@ For development/testing purposes, run this script as:
|
|
|
211
211
|
|
|
212
212
|
$ panel serve solara_in_panel.py
|
|
213
213
|
|
|
214
|
-
Solara apps in Panel do not have support for [routing](/
|
|
214
|
+
Solara apps in Panel do not have support for [routing](/documentation/advanced/understanding/routing)/[multipage](/documentation/advanced/howto/multipage).
|
|
215
215
|
|
|
216
216
|
## Nginx
|
|
217
217
|
|
|
@@ -73,4 +73,4 @@ Sign up for our waiting list to get early access.
|
|
|
73
73
|
|
|
74
74
|
You can use [Ploomber Cloud](https://www.platform.ploomber.io) to deploy Solara apps for free (no credit card required).
|
|
75
75
|
|
|
76
|
-
To learn more, check out their [documentation.](https://docs.cloud.ploomber.io/en/latest/apps/solara.html)
|
|
76
|
+
To learn more, check out their [documentation.](https://docs.cloud.ploomber.io/en/latest/apps/solara.html)
|
|
File without changes
|
|
@@ -9,7 +9,7 @@ def Page():
|
|
|
9
9
|
with solara.Card("Wanderlust", style={"height": "100%"}):
|
|
10
10
|
solara.Markdown(
|
|
11
11
|
"""
|
|
12
|
-
[Wanderlust](
|
|
12
|
+
[Wanderlust](/showcase/wanderlust) is a reproduction of the travel assistant demo shown at the
|
|
13
13
|
[OpenAI DevDay](https://devday.openai.com/) 2023, built using Solara and the OpenAI Assistants API.
|
|
14
14
|
"""
|
|
15
15
|
)
|
|
@@ -50,7 +50,7 @@ def Page():
|
|
|
50
50
|
|
|
51
51
|
# App deploying
|
|
52
52
|
|
|
53
|
-
To deploy apps we use [solara server](/
|
|
53
|
+
To deploy apps we use [solara server](/documentation/advanced/understanding/solara-server) which can
|
|
54
54
|
render the same UI as in the notebook, but now sharable with non-technical users.
|
|
55
55
|
|
|
56
56
|
Many users have deployed apps at Domino using Solara with
|
|
@@ -22,7 +22,7 @@ def Page():
|
|
|
22
22
|
|
|
23
23
|
Solara.dev is designed to be responsive, working seamlessly on both desktop and mobile devices.
|
|
24
24
|
On smaller screens, the top navigation bar is replaced with a drawer for easy navigation.
|
|
25
|
-
The [`ColumnsResponsive`](/
|
|
25
|
+
The [`ColumnsResponsive`](/documentation/components/layout/columns_responsive) component can be used to create responsive content layouts.
|
|
26
26
|
|
|
27
27
|
"""
|
|
28
28
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"><path fill="#fff" d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="1200" height="1227" viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: solara
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.30.0
|
|
4
|
+
Dynamic: Summary
|
|
4
5
|
Project-URL: Home, https://www.github.com/widgetti/solara
|
|
5
6
|
Author-email: "Maarten A. Breddels" <maartenbreddels@gmail.com>
|
|
6
7
|
License: The MIT License (MIT)
|
|
@@ -49,7 +50,7 @@ Requires-Dist: watchdog
|
|
|
49
50
|
Requires-Dist: watchfiles; python_version > '3.6'
|
|
50
51
|
Requires-Dist: websockets
|
|
51
52
|
Provides-Extra: assets
|
|
52
|
-
Requires-Dist: solara-assets==1.
|
|
53
|
+
Requires-Dist: solara-assets==1.30.0; extra == 'assets'
|
|
53
54
|
Provides-Extra: dev
|
|
54
55
|
Requires-Dist: black; extra == 'dev'
|
|
55
56
|
Requires-Dist: bqplot; extra == 'dev'
|
|
@@ -138,7 +139,7 @@ Run:
|
|
|
138
139
|
pip install solara
|
|
139
140
|
```
|
|
140
141
|
|
|
141
|
-
Or follow the [Installation instructions](https://solara.dev/
|
|
142
|
+
Or follow the [Installation instructions](https://solara.dev/documentation/getting_started/installing) for more detailed instructions.
|
|
142
143
|
|
|
143
144
|
## First script
|
|
144
145
|
|
|
@@ -184,7 +185,7 @@ Solara server is starting at http://localhost:8765
|
|
|
184
185
|
Or copy-paste this to a Jupyter notebook cell and execute it (the `Page()` expression at the end
|
|
185
186
|
will cause it to automatically render the component in the notebook).
|
|
186
187
|
|
|
187
|
-
See this snippet run live at https://solara.dev/
|
|
188
|
+
See this snippet run live at https://solara.dev/documentation/getting_started
|
|
188
189
|
|
|
189
190
|
## Demo
|
|
190
191
|
|
|
@@ -211,7 +212,7 @@ By building on top of ipywidgets, we automatically leverage an existing ecosyste
|
|
|
211
212
|
|
|
212
213
|
Visit our main website or jump directly to the introduction
|
|
213
214
|
|
|
214
|
-
[](https://solara.dev/
|
|
215
|
-
[](https://solara.dev/
|
|
215
|
+
[](https://solara.dev/documentation)
|
|
216
|
+
[](https://solara.dev/documentation/getting_started)
|
|
216
217
|
|
|
217
218
|
*Note that the solara.dev website is created using Solara*
|