solara 1.29.1__py2.py3-none-any.whl → 1.30.1__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 +88 -56
- 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 +9 -8
- 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/image.py +1 -1
- 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/scope/__init__.py +3 -2
- solara/server/app.py +44 -1
- solara/server/assets/style.css +6 -0
- solara/server/esm.py +28 -4
- solara/server/kernel_context.py +78 -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/components/markdown.py +30 -0
- solara/website/pages/__init__.py +234 -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} +43 -2
- solara/website/pages/contact/__init__.py +8 -0
- solara/website/pages/documentation/__init__.py +184 -0
- solara/website/pages/{docs → documentation/advanced}/__init__.py +2 -2
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +5 -0
- solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +9 -5
- solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +26 -21
- solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +5 -0
- solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +4 -1
- solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +7 -1
- solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +4 -0
- solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +10 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +5 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +5 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +4 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +5 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +6 -2
- solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +7 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +9 -3
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +5 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +13 -9
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +6 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +5 -0
- solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +7 -3
- solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +9 -5
- solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +6 -2
- 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/custom_storage.py +1 -1
- 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 +12 -0
- solara/website/pages/{docs → documentation/faq}/content/99-faq.md +4 -1
- solara/website/pages/documentation/getting_started/__init__.py +9 -0
- solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +7 -2
- solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +20 -16
- solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +5 -1
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +14 -0
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +9 -4
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +13 -9
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +17 -12
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +7 -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 +11 -0
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +7 -2
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +8 -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}/40-static_files.md +4 -0
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +7 -3
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +4 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +6 -1
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +7 -0
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +7 -3
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +5 -1
- solara/website/pages/documentation/getting_started/content/80-what-is-lab.md +7 -0
- solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +4 -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.1.dist-info}/METADATA +8 -7
- solara-1.30.1.dist-info/RECORD +437 -0
- {solara-1.29.1.dist-info → solara-1.30.1.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/20-understanding/00-introduction.md +0 -4
- solara/website/pages/docs/content/20-understanding/17-rules-of-hooks.md +0 -3
- solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
- solara/website/pages/docs/content/lab/00-what-is-lab.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/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/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/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-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/entry_points.txt +0 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,15 +5,14 @@ These are the components available in Solara to build chat interfaces.
|
|
|
5
5
|
Although they can be used together to create a pre-built chat interface, inserting custom components is also possible.
|
|
6
6
|
For an example of how to use a custom message component, see the bottom of the page.
|
|
7
7
|
|
|
8
|
-
Also check out the [Chatbot](/examples/ai/chatbot) example.
|
|
8
|
+
Also check out the [Chatbot](/documentation/examples/ai/chatbot) example.
|
|
9
9
|
|
|
10
10
|
# ChatBox
|
|
11
11
|
"""
|
|
12
12
|
import solara
|
|
13
|
+
from solara.website.components import NoPage
|
|
13
14
|
from solara.website.utils import apidoc
|
|
14
15
|
|
|
15
|
-
from . import NoPage
|
|
16
|
-
|
|
17
16
|
title = "Chat Components"
|
|
18
17
|
|
|
19
18
|
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
import solara
|
|
5
5
|
import solara.autorouting
|
|
6
6
|
import solara.lab
|
|
7
|
+
from solara.website.components import NoPage
|
|
7
8
|
from solara.website.utils import apidoc
|
|
8
9
|
|
|
9
|
-
from . import NoPage
|
|
10
|
-
|
|
11
10
|
title = "Task"
|
|
12
11
|
Page = NoPage
|
|
13
12
|
__doc__ += apidoc(solara.lab.task) # type: ignore
|
|
@@ -64,10 +64,9 @@ responds to the theme variant change.
|
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
66
|
import solara
|
|
67
|
+
from solara.website.components import NoPage
|
|
67
68
|
from solara.website.utils import apidoc
|
|
68
69
|
|
|
69
|
-
from . import NoPage
|
|
70
|
-
|
|
71
70
|
title = "Themes"
|
|
72
71
|
Page = NoPage
|
|
73
72
|
__doc__ += apidoc(solara.lab.ThemeToggle) # type: ignore
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
import solara
|
|
5
5
|
import solara.autorouting
|
|
6
6
|
import solara.lab
|
|
7
|
+
from solara.website.components import NoPage
|
|
7
8
|
from solara.website.utils import apidoc
|
|
8
9
|
|
|
9
|
-
from . import NoPage
|
|
10
|
-
|
|
11
10
|
title = "use_task"
|
|
12
11
|
Page = NoPage
|
|
13
12
|
__doc__ += apidoc(solara.lab.use_task) # type: ignore
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Solara has 4 types of alerts:
|
|
4
4
|
|
|
5
|
-
* [Success](/
|
|
6
|
-
* [Info](/
|
|
7
|
-
* [Warning](/
|
|
5
|
+
* [Success](/documentation/components/status/success)
|
|
6
|
+
* [Info](/documentation/components/status/info)
|
|
7
|
+
* [Warning](/documentation/components/status/warning)
|
|
8
8
|
* Error (this page)
|
|
9
9
|
|
|
10
10
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Solara has 4 types of alerts:
|
|
4
4
|
|
|
5
|
-
* [Success](/
|
|
5
|
+
* [Success](/documentation/components/status/success)
|
|
6
6
|
* Info (this page)
|
|
7
|
-
* [Warning](/
|
|
8
|
-
* [Error](/
|
|
7
|
+
* [Warning](/documentation/components/status/warning)
|
|
8
|
+
* [Error](/documentation/components/status/error)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Solara has 4 types of alerts:
|
|
4
4
|
|
|
5
5
|
* Success (this page)
|
|
6
|
-
* [Info](/
|
|
7
|
-
* [Warning](/
|
|
8
|
-
* [Error](/
|
|
6
|
+
* [Info](/documentation/components/status/info)
|
|
7
|
+
* [Warning](/documentation/components/status/warning)
|
|
8
|
+
* [Error](/documentation/components/status/error)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Solara has 4 types of alerts:
|
|
4
4
|
|
|
5
|
-
* [Success](/
|
|
6
|
-
* [Info](/
|
|
5
|
+
* [Success](/documentation/components/status/success)
|
|
6
|
+
* [Info](/documentation/components/status/info)
|
|
7
7
|
* Warning (this page)
|
|
8
|
-
* [Error](/
|
|
8
|
+
* [Error](/documentation/components/status/error)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -1,52 +1,12 @@
|
|
|
1
|
-
# import inspect
|
|
2
|
-
# import urllib.parse
|
|
3
|
-
|
|
4
1
|
import solara
|
|
2
|
+
from solara.website.components import Gallery
|
|
5
3
|
|
|
6
4
|
title = "Examples"
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
@solara.component
|
|
10
|
-
def Page():
|
|
11
|
-
|
|
12
|
-
router = solara.use_router()
|
|
13
|
-
route_current = router.path_routes[-2]
|
|
14
|
-
|
|
15
|
-
for route in route_current.children:
|
|
16
|
-
if route.children:
|
|
17
|
-
solara.Markdown(f"## {route.label}\n" + (route.module.__doc__ or ""))
|
|
18
|
-
with solara.ColumnsResponsive(12, 6, 6, 6, 4):
|
|
19
|
-
for child in route.children:
|
|
20
|
-
path = route.path + "/" + child.path
|
|
21
|
-
if child.path in [
|
|
22
|
-
"tokenizer",
|
|
23
|
-
"sine",
|
|
24
|
-
"authorization",
|
|
25
|
-
"layout_demo",
|
|
26
|
-
"multipage",
|
|
27
|
-
"scatter",
|
|
28
|
-
"scrolling",
|
|
29
|
-
"tutorial_streamlit",
|
|
30
|
-
"login_oauth",
|
|
31
|
-
"pokemon_search",
|
|
32
|
-
"altair",
|
|
33
|
-
"bqplot",
|
|
34
|
-
"ipyleaflet",
|
|
35
|
-
"calculator",
|
|
36
|
-
"countdown_timer",
|
|
37
|
-
"todo",
|
|
38
|
-
]:
|
|
39
|
-
image = route.path + "/" + child.path + ".png"
|
|
40
|
-
image_url = "https://dxhl76zpt6fap.cloudfront.net/public/examples/" + image
|
|
41
|
-
else:
|
|
42
|
-
image_url = "https://dxhl76zpt6fap.cloudfront.net/public/logo.svg"
|
|
43
|
-
|
|
44
|
-
path = getattr(child.module, "redirect", path)
|
|
45
|
-
if path:
|
|
46
|
-
with solara.Card(child.label, style="height: 100%;"):
|
|
47
|
-
with solara.Link(path):
|
|
48
|
-
with solara.Column(align="center"):
|
|
49
|
-
solara.Image(image_url, width="120px" if image_url.endswith(".svg") else "100%")
|
|
8
|
+
def Page(route_external=None):
|
|
9
|
+
Gallery(route_external)
|
|
50
10
|
|
|
51
11
|
|
|
52
12
|
@solara.component
|
|
@@ -10,7 +10,7 @@ function to get a unique id tied to the users browser. This can be used to store
|
|
|
10
10
|
|
|
11
11
|
In case you want to store state/data scoped to a user, you can use a similar strategy, but use a unique identifier based on the user,
|
|
12
12
|
instead of the session id. You can take a look at [Our oauth example](examples/general/login_oauth) or
|
|
13
|
-
[the authorization example](/
|
|
13
|
+
[the authorization example](/apps/authorization) for inspiration.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
16
|
from typing import Dict
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""# Deploy model demo
|
|
2
2
|
|
|
3
|
-
This show off a combination of [solara.lab.Menu](/
|
|
4
|
-
|
|
3
|
+
This show off a combination of [solara.lab.Menu](/documentation/components/lab/menu) and
|
|
4
|
+
[solara.lab.ConfirmationDialog](/documentation/components/lab/confirmation_dialog)
|
|
5
|
+
and [solara.use_thread](/documentation/api/hooks/use_thread) to demonstrate how to tune, fit and deploy a model.
|
|
5
6
|
The actually deployment is not real, but simulated by a thread that returns a boolean value on success and sleep for a while to
|
|
6
7
|
similate the deployment taking time.
|
|
7
8
|
|
|
@@ -15,7 +16,6 @@ import time
|
|
|
15
16
|
import numpy as np
|
|
16
17
|
import pandas as pd
|
|
17
18
|
import plotly.express as px
|
|
18
|
-
|
|
19
19
|
import solara
|
|
20
20
|
import solara.lab
|
|
21
21
|
|
|
@@ -54,7 +54,7 @@ def Page():
|
|
|
54
54
|
|
|
55
55
|
This is the raw user data from the auth provider.
|
|
56
56
|
|
|
57
|
-
We use the `picture` field to display an avatar in the [AppBar](/
|
|
57
|
+
We use the `picture` field to display an avatar in the [AppBar](/documentation/components/layout/app_bar).
|
|
58
58
|
"""
|
|
59
59
|
)
|
|
60
60
|
sl.Preformatted(pprint.pformat(auth.user.value))
|
|
@@ -4,7 +4,7 @@ Although many components can be made from the Python side, sometimes it is easie
|
|
|
4
4
|
It can also be beneficial for performance, since instead of creating many widgets from the Python side we only send data to
|
|
5
5
|
the frontend. If event handling is also done on the frontend, this reduces latency and makes you app feel much smoother.
|
|
6
6
|
|
|
7
|
-
See [the API documentation on component_vue](/api/component_vue) for more information.
|
|
7
|
+
See [the API documentation on component_vue](/documentation/api/utilities/component_vue) for more information.
|
|
8
8
|
|
|
9
9
|
This example is based on [the vuetify docs](https://v2.vuetifyjs.com/en/components/sparklines/#custom-labels),
|
|
10
10
|
Note that the "Go to report" button does not do anything yet.
|
|
@@ -14,7 +14,6 @@ Note that the "Go to report" button does not do anything yet.
|
|
|
14
14
|
from typing import Callable
|
|
15
15
|
|
|
16
16
|
import numpy as np
|
|
17
|
-
|
|
18
17
|
import solara
|
|
19
18
|
|
|
20
19
|
seed = solara.reactive(42)
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[Altair](https://altair-viz.github.io/index.html) is a declarative statistical visualization library for Python.
|
|
4
4
|
|
|
5
|
-
This example show how to use the [on_click handler](/
|
|
5
|
+
This example show how to use the [on_click handler](/documentation/components/viz/altair) to display data for a specific day in the chart.
|
|
6
6
|
|
|
7
7
|
Based on [an Altair example](https://altair-viz.github.io/gallery/annual_weather_heatmap.html)
|
|
8
8
|
|
|
9
9
|
"""
|
|
10
10
|
import altair as alt
|
|
11
11
|
import pandas as pd
|
|
12
|
-
from vega_datasets import data
|
|
13
|
-
|
|
14
12
|
import solara
|
|
13
|
+
from vega_datasets import data
|
|
15
14
|
|
|
16
15
|
# title = "Altair visualization"
|
|
17
16
|
source = data.seattle_weather()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
# ipyleaflet advanced
|
|
3
3
|
|
|
4
|
-
Extends the [basic ipyleaflet example](/examples/libraries/ipyleaflet) with a marker that can be dragged around, and a
|
|
4
|
+
Extends the [basic ipyleaflet example](/documentation/examples/libraries/ipyleaflet) with a marker that can be dragged around, and a
|
|
5
5
|
dropdown to select the map style. Two buttons allow to reset the map to the default zoom and center and to zoom
|
|
6
6
|
to the marker.
|
|
7
7
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""# Countdown timer.
|
|
2
2
|
|
|
3
|
-
This example shows how to use [use_thread](/api/use_thread) to create a countdown timer.
|
|
3
|
+
This example shows how to use [use_thread](/documentation/api/hooks/use_thread) to create a countdown timer.
|
|
4
4
|
|
|
5
5
|
The UI code demonstrates a lot of conditional rendering.
|
|
6
6
|
|
|
@@ -8,12 +8,11 @@ Inspired by the dash documentation.
|
|
|
8
8
|
## Note
|
|
9
9
|
|
|
10
10
|
Solara supports plotly and plotly express. Create your figure (not a figure widget)
|
|
11
|
-
and pass it to the [FigurePlotly](/
|
|
11
|
+
and pass it to the [FigurePlotly](/documentation/components/viz/plotly) component.
|
|
12
12
|
|
|
13
13
|
"""
|
|
14
14
|
import pandas as pd
|
|
15
15
|
import plotly.express as px
|
|
16
|
-
|
|
17
16
|
import solara
|
|
18
17
|
|
|
19
18
|
title = "Scatter plot using Plotly"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import solara
|
|
4
|
+
from solara.website.components.markdown import MarkdownWithMetadata
|
|
5
|
+
|
|
6
|
+
title = "FAQ"
|
|
7
|
+
HERE = Path(__file__)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@solara.component
|
|
11
|
+
def Page(route_external=None):
|
|
12
|
+
MarkdownWithMetadata(Path(HERE.parent / "content" / "99-faq.md").read_text())
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from solara.autorouting import generate_routes_directory
|
|
4
|
+
from solara.website.components.markdown import MarkdownWithMetadata
|
|
5
|
+
|
|
6
|
+
HERE = Path(__file__)
|
|
7
|
+
# if we didn't put the content in the subdirectory, but pointed to the current file
|
|
8
|
+
# we would include the current file recursively, causing an infinite loop
|
|
9
|
+
routes = generate_routes_directory(HERE.parent / "content", MarkdownWithMetadata)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Solara Quickstart
|
|
3
|
+
description: Get started with building web- and data-apps in pure python with Solara.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Quickstart
|
|
2
7
|
|
|
3
8
|
This 1-minute quickstart will get you to:
|
|
@@ -7,12 +12,12 @@ This 1-minute quickstart will get you to:
|
|
|
7
12
|
* Run your script using Solara server.
|
|
8
13
|
* (Optional) Reuse your code in the Jupyter notebook.
|
|
9
14
|
|
|
10
|
-
If you are an existing ipywidget user and do not want to learn the component based method, you might want to skip the quickstart and directly go to the [IPywidgets user tutorial](/
|
|
15
|
+
If you are an existing ipywidget user and do not want to learn the component based method, you might want to skip the quickstart and directly go to the [IPywidgets user tutorial](/documentation/getting_started/tutorials/ipywidgets).
|
|
11
16
|
|
|
12
17
|
## Installation
|
|
13
18
|
|
|
14
19
|
|
|
15
|
-
Run `pip install solara`, or follow the [Installation instructions](/
|
|
20
|
+
Run `pip install solara`, or follow the [Installation instructions](/documentation/getting_started/installing) for more detailed instructions.
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
## First script
|