solara-ui 1.45.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prefix/etc/jupyter/jupyter_notebook_config.d/solara.json +7 -0
- prefix/etc/jupyter/jupyter_server_config.d/solara.json +7 -0
- solara/__init__.py +124 -0
- solara/__main__.py +765 -0
- solara/_stores.py +297 -0
- solara/alias.py +6 -0
- solara/autorouting.py +555 -0
- solara/cache.py +305 -0
- solara/checks.html +71 -0
- solara/checks.py +227 -0
- solara/comm.py +28 -0
- solara/components/__init__.py +77 -0
- solara/components/alert.py +155 -0
- solara/components/applayout.py +397 -0
- solara/components/button.py +85 -0
- solara/components/card.py +87 -0
- solara/components/checkbox.py +50 -0
- solara/components/code_highlight_css.py +11 -0
- solara/components/code_highlight_css.vue +63 -0
- solara/components/columns.py +159 -0
- solara/components/component_vue.py +134 -0
- solara/components/cross_filter.py +335 -0
- solara/components/dataframe.py +546 -0
- solara/components/datatable.py +214 -0
- solara/components/datatable.vue +175 -0
- solara/components/details.py +56 -0
- solara/components/download.vue +35 -0
- solara/components/echarts.py +86 -0
- solara/components/echarts.vue +139 -0
- solara/components/figure_altair.py +39 -0
- solara/components/file_browser.py +181 -0
- solara/components/file_download.py +199 -0
- solara/components/file_drop.py +159 -0
- solara/components/file_drop.vue +83 -0
- solara/components/file_list_widget.vue +78 -0
- solara/components/head.py +27 -0
- solara/components/head_tag.py +49 -0
- solara/components/head_tag.vue +60 -0
- solara/components/image.py +173 -0
- solara/components/input.py +456 -0
- solara/components/input_text_area.py +86 -0
- solara/components/link.py +55 -0
- solara/components/markdown.py +441 -0
- solara/components/markdown_editor.py +33 -0
- solara/components/markdown_editor.vue +359 -0
- solara/components/matplotlib.py +74 -0
- solara/components/meta.py +47 -0
- solara/components/misc.py +333 -0
- solara/components/pivot_table.py +258 -0
- solara/components/pivot_table.vue +158 -0
- solara/components/progress.py +47 -0
- solara/components/select.py +182 -0
- solara/components/select.vue +27 -0
- solara/components/slider.py +442 -0
- solara/components/slider_date.vue +56 -0
- solara/components/spinner-solara.vue +105 -0
- solara/components/spinner.py +45 -0
- solara/components/sql_code.py +41 -0
- solara/components/sql_code.vue +125 -0
- solara/components/style.py +105 -0
- solara/components/switch.py +71 -0
- solara/components/tab_navigation.py +37 -0
- solara/components/title.py +90 -0
- solara/components/title.vue +38 -0
- solara/components/togglebuttons.py +200 -0
- solara/components/tooltip.py +61 -0
- solara/core.py +42 -0
- solara/datatypes.py +143 -0
- solara/express.py +241 -0
- solara/hooks/__init__.py +4 -0
- solara/hooks/dataframe.py +99 -0
- solara/hooks/misc.py +263 -0
- solara/hooks/use_reactive.py +151 -0
- solara/hooks/use_thread.py +129 -0
- solara/kitchensink.py +8 -0
- solara/lab/__init__.py +34 -0
- solara/lab/components/__init__.py +7 -0
- solara/lab/components/chat.py +215 -0
- solara/lab/components/confirmation_dialog.py +163 -0
- solara/lab/components/cross_filter.py +7 -0
- solara/lab/components/input_date.py +339 -0
- solara/lab/components/input_time.py +133 -0
- solara/lab/components/menu.py +181 -0
- solara/lab/components/menu.vue +38 -0
- solara/lab/components/tabs.py +274 -0
- solara/lab/components/theming.py +98 -0
- solara/lab/components/theming.vue +72 -0
- solara/lab/hooks/__init__.py +0 -0
- solara/lab/hooks/dataframe.py +2 -0
- solara/lab/toestand.py +3 -0
- solara/lab/utils/__init__.py +2 -0
- solara/lab/utils/cookies.py +5 -0
- solara/lab/utils/dataframe.py +165 -0
- solara/lab/utils/headers.py +5 -0
- solara/layout.py +44 -0
- solara/lifecycle.py +46 -0
- solara/minisettings.py +141 -0
- solara/py.typed +0 -0
- solara/reactive.py +99 -0
- solara/routing.py +268 -0
- solara/scope/__init__.py +88 -0
- solara/scope/types.py +55 -0
- solara/server/__init__.py +0 -0
- solara/server/app.py +527 -0
- solara/server/assets/custom.css +1 -0
- solara/server/assets/custom.js +1 -0
- solara/server/assets/favicon.png +0 -0
- solara/server/assets/favicon.svg +5 -0
- solara/server/assets/style.css +1681 -0
- solara/server/assets/theme-dark.css +437 -0
- solara/server/assets/theme-light.css +420 -0
- solara/server/assets/theme.js +3 -0
- solara/server/cdn_helper.py +91 -0
- solara/server/esm.py +71 -0
- solara/server/fastapi.py +5 -0
- solara/server/flask.py +297 -0
- solara/server/jupyter/__init__.py +2 -0
- solara/server/jupyter/cdn_handler.py +28 -0
- solara/server/jupyter/server_extension.py +40 -0
- solara/server/jupyter/solara.py +91 -0
- solara/server/jupytertools.py +46 -0
- solara/server/kernel.py +388 -0
- solara/server/kernel_context.py +467 -0
- solara/server/patch.py +564 -0
- solara/server/pyinstaller/__init__.py +9 -0
- solara/server/pyinstaller/hook-ipyreact.py +5 -0
- solara/server/pyinstaller/hook-ipyvuetify.py +5 -0
- solara/server/pyinstaller/hook-solara.py +9 -0
- solara/server/qt.py +113 -0
- solara/server/reload.py +251 -0
- solara/server/server.py +484 -0
- solara/server/settings.py +249 -0
- solara/server/shell.py +269 -0
- solara/server/starlette.py +770 -0
- solara/server/static/ansi.js +270 -0
- solara/server/static/highlight-dark.css +82 -0
- solara/server/static/highlight.css +43 -0
- solara/server/static/main-vuetify.js +272 -0
- solara/server/static/main.js +163 -0
- solara/server/static/solara_bootstrap.py +129 -0
- solara/server/static/sun.svg +23 -0
- solara/server/static/webworker.js +42 -0
- solara/server/telemetry.py +212 -0
- solara/server/templates/index.html.j2 +1 -0
- solara/server/templates/loader-plain.css +11 -0
- solara/server/templates/loader-plain.html +20 -0
- solara/server/templates/loader-solara.css +111 -0
- solara/server/templates/loader-solara.html +40 -0
- solara/server/templates/plain.html +82 -0
- solara/server/templates/solara.html.j2 +486 -0
- solara/server/threaded.py +84 -0
- solara/server/utils.py +44 -0
- solara/server/websocket.py +45 -0
- solara/settings.py +86 -0
- solara/tasks.py +893 -0
- solara/template/button.py +16 -0
- solara/template/markdown.py +42 -0
- solara/template/portal/.flake8 +6 -0
- solara/template/portal/.pre-commit-config.yaml +28 -0
- solara/template/portal/LICENSE +21 -0
- solara/template/portal/Procfile +7 -0
- solara/template/portal/mypy.ini +3 -0
- solara/template/portal/pyproject.toml +26 -0
- solara/template/portal/solara_portal/__init__.py +4 -0
- solara/template/portal/solara_portal/components/__init__.py +2 -0
- solara/template/portal/solara_portal/components/article.py +28 -0
- solara/template/portal/solara_portal/components/data.py +28 -0
- solara/template/portal/solara_portal/components/header.py +6 -0
- solara/template/portal/solara_portal/components/layout.py +6 -0
- solara/template/portal/solara_portal/content/articles/equis-in-vidi.md +85 -0
- solara/template/portal/solara_portal/content/articles/substiterat-vati.md +70 -0
- solara/template/portal/solara_portal/data.py +60 -0
- solara/template/portal/solara_portal/pages/__init__.py +67 -0
- solara/template/portal/solara_portal/pages/article/__init__.py +26 -0
- solara/template/portal/solara_portal/pages/tabular.py +29 -0
- solara/template/portal/solara_portal/pages/viz/__init__.py +70 -0
- solara/template/portal/solara_portal/pages/viz/overview.py +14 -0
- solara/test/__init__.py +0 -0
- solara/test/pytest_plugin.py +783 -0
- solara/toestand.py +998 -0
- solara/util.py +348 -0
- solara/validate_hooks.py +258 -0
- solara/website/__init__.py +0 -0
- solara/website/assets/custom.css +444 -0
- solara/website/assets/images/logo-small.png +0 -0
- solara/website/assets/images/logo.svg +17 -0
- solara/website/assets/images/logo_white.svg +50 -0
- solara/website/assets/theme.js +8 -0
- solara/website/components/__init__.py +5 -0
- solara/website/components/algolia.py +6 -0
- solara/website/components/algolia.vue +24 -0
- solara/website/components/algolia_api.vue +202 -0
- solara/website/components/breadcrumbs.py +28 -0
- solara/website/components/contact.py +144 -0
- solara/website/components/docs.py +143 -0
- solara/website/components/header.py +75 -0
- solara/website/components/mailchimp.py +12 -0
- solara/website/components/mailchimp.vue +47 -0
- solara/website/components/markdown.py +99 -0
- solara/website/components/markdown_nav.vue +34 -0
- solara/website/components/notebook.py +171 -0
- solara/website/components/sidebar.py +105 -0
- solara/website/pages/__init__.py +370 -0
- solara/website/pages/about/__init__.py +9 -0
- solara/website/pages/about/about.md +3 -0
- solara/website/pages/apps/__init__.py +16 -0
- solara/website/pages/apps/authorization/__init__.py +119 -0
- solara/website/pages/apps/authorization/admin.py +12 -0
- solara/website/pages/apps/authorization/users.py +12 -0
- solara/website/pages/apps/jupyter-dashboard-1.py +116 -0
- solara/website/pages/apps/layout-demo.py +40 -0
- solara/website/pages/apps/multipage/__init__.py +38 -0
- solara/website/pages/apps/multipage/page1.py +26 -0
- solara/website/pages/apps/multipage/page2.py +34 -0
- solara/website/pages/apps/scatter.py +136 -0
- solara/website/pages/apps/scrolling.py +63 -0
- solara/website/pages/apps/tutorial-streamlit.py +18 -0
- solara/website/pages/careers/__init__.py +27 -0
- solara/website/pages/changelog/__init__.py +10 -0
- solara/website/pages/changelog/changelog.md +372 -0
- solara/website/pages/contact/__init__.py +34 -0
- solara/website/pages/doc_use_download.py +85 -0
- solara/website/pages/documentation/__init__.py +90 -0
- solara/website/pages/documentation/advanced/__init__.py +9 -0
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/documentation/advanced/content/10-howto/00-overview.md +6 -0
- solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md +196 -0
- solara/website/pages/documentation/advanced/content/10-howto/20-layout.md +125 -0
- solara/website/pages/documentation/advanced/content/10-howto/30-testing.md +417 -0
- solara/website/pages/documentation/advanced/content/10-howto/31-debugging.md +69 -0
- solara/website/pages/documentation/advanced/content/10-howto/40-embed.md +50 -0
- solara/website/pages/documentation/advanced/content/10-howto/50-ipywidget_libraries.md +124 -0
- solara/website/pages/documentation/advanced/content/15-reference/00-overview.md +3 -0
- solara/website/pages/documentation/advanced/content/15-reference/40-static_files.md +31 -0
- solara/website/pages/documentation/advanced/content/15-reference/41-asset-files.md +72 -0
- solara/website/pages/documentation/advanced/content/15-reference/60-static-site-generation.md +59 -0
- solara/website/pages/documentation/advanced/content/15-reference/70-search.md +34 -0
- solara/website/pages/documentation/advanced/content/15-reference/80-reloading.md +34 -0
- solara/website/pages/documentation/advanced/content/15-reference/90-notebook-support.md +7 -0
- solara/website/pages/documentation/advanced/content/15-reference/95-caching.md +148 -0
- solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +10 -0
- solara/website/pages/documentation/advanced/content/20-understanding/05-ipywidgets.md +35 -0
- solara/website/pages/documentation/advanced/content/20-understanding/06-ipyvuetify.md +42 -0
- solara/website/pages/documentation/advanced/content/20-understanding/10-reacton.md +28 -0
- solara/website/pages/documentation/advanced/content/20-understanding/12-reacton-basics.md +108 -0
- solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md +23 -0
- solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +192 -0
- solara/website/pages/documentation/advanced/content/20-understanding/18-containers.md +166 -0
- solara/website/pages/documentation/advanced/content/20-understanding/20-solara.md +18 -0
- solara/website/pages/documentation/advanced/content/20-understanding/40-routing.md +256 -0
- solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md +108 -0
- solara/website/pages/documentation/advanced/content/20-understanding/60-voila.md +12 -0
- solara/website/pages/documentation/advanced/content/30-enterprise/00-overview.md +7 -0
- solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md +187 -0
- solara/website/pages/documentation/advanced/content/40-development/00-overview.md +0 -0
- solara/website/pages/documentation/advanced/content/40-development/01-contribute.md +45 -0
- solara/website/pages/documentation/advanced/content/40-development/10-setup.md +76 -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/cross_filter/cross_filter_dataframe.py +22 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_report.py +20 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_select.py +20 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_slider.py +20 -0
- solara/website/pages/documentation/api/hooks/__init__.py +9 -0
- solara/website/pages/documentation/api/hooks/use_cross_filter.py +23 -0
- solara/website/pages/documentation/api/hooks/use_dark_effective.py +12 -0
- solara/website/pages/documentation/api/hooks/use_effect.md +43 -0
- solara/website/pages/documentation/api/hooks/use_effect.py +9 -0
- solara/website/pages/documentation/api/hooks/use_exception.py +31 -0
- solara/website/pages/documentation/api/hooks/use_memo.md +16 -0
- solara/website/pages/documentation/api/hooks/use_memo.py +9 -0
- solara/website/pages/documentation/api/hooks/use_previous.py +30 -0
- solara/website/pages/documentation/api/hooks/use_reactive.py +16 -0
- solara/website/pages/documentation/api/hooks/use_state.py +10 -0
- solara/website/pages/documentation/api/hooks/use_state_or_update.py +66 -0
- solara/website/pages/documentation/api/hooks/use_thread.md +64 -0
- solara/website/pages/documentation/api/hooks/use_thread.py +42 -0
- solara/website/pages/documentation/api/hooks/use_trait_observe.py +12 -0
- solara/website/pages/documentation/api/routing/__init__.py +9 -0
- solara/website/pages/documentation/api/routing/generate_routes.py +10 -0
- solara/website/pages/documentation/api/routing/generate_routes_directory.py +10 -0
- solara/website/pages/documentation/api/routing/resolve_path.py +35 -0
- solara/website/pages/documentation/api/routing/route.py +29 -0
- solara/website/pages/documentation/api/routing/use_route.py +76 -0
- solara/website/pages/documentation/api/routing/use_router.py +16 -0
- solara/website/pages/documentation/api/utilities/__init__.py +9 -0
- solara/website/pages/documentation/api/utilities/component_vue.py +10 -0
- solara/website/pages/documentation/api/utilities/computed.py +16 -0
- solara/website/pages/documentation/api/utilities/display.py +16 -0
- solara/website/pages/documentation/api/utilities/get_kernel_id.py +16 -0
- solara/website/pages/documentation/api/utilities/get_session_id.py +16 -0
- solara/website/pages/documentation/api/utilities/memoize.py +35 -0
- solara/website/pages/documentation/api/utilities/on_kernel_start.py +44 -0
- solara/website/pages/documentation/api/utilities/reactive.py +16 -0
- solara/website/pages/documentation/api/utilities/widget.py +104 -0
- solara/website/pages/documentation/components/__init__.py +12 -0
- solara/website/pages/documentation/components/advanced/__init__.py +9 -0
- solara/website/pages/documentation/components/advanced/link.py +25 -0
- solara/website/pages/documentation/components/advanced/meta.py +17 -0
- solara/website/pages/documentation/components/advanced/style.py +43 -0
- solara/website/pages/documentation/components/common.py +9 -0
- solara/website/pages/documentation/components/data/__init__.py +9 -0
- solara/website/pages/documentation/components/data/dataframe.py +44 -0
- solara/website/pages/documentation/components/data/pivot_table.py +81 -0
- solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
- solara/website/pages/documentation/components/enterprise/avatar.py +24 -0
- solara/website/pages/documentation/components/enterprise/avatar_menu.py +25 -0
- solara/website/pages/documentation/components/input/__init__.py +9 -0
- solara/website/pages/documentation/components/input/button.py +23 -0
- solara/website/pages/documentation/components/input/checkbox.py +10 -0
- solara/website/pages/documentation/components/input/file_browser.py +30 -0
- solara/website/pages/documentation/components/input/file_drop.py +76 -0
- solara/website/pages/documentation/components/input/input.py +43 -0
- solara/website/pages/documentation/components/input/select.py +22 -0
- solara/website/pages/documentation/components/input/slider.py +29 -0
- solara/website/pages/documentation/components/input/switch.py +10 -0
- solara/website/pages/documentation/components/input/togglebuttons.py +21 -0
- solara/website/pages/documentation/components/lab/__init__.py +9 -0
- solara/website/pages/documentation/components/lab/chat.py +109 -0
- solara/website/pages/documentation/components/lab/confirmation_dialog.py +55 -0
- solara/website/pages/documentation/components/lab/cookies_headers.py +48 -0
- solara/website/pages/documentation/components/lab/input_date.py +20 -0
- solara/website/pages/documentation/components/lab/input_time.py +15 -0
- solara/website/pages/documentation/components/lab/menu.py +22 -0
- solara/website/pages/documentation/components/lab/tab.py +25 -0
- solara/website/pages/documentation/components/lab/tabs.py +45 -0
- solara/website/pages/documentation/components/lab/task.py +11 -0
- solara/website/pages/documentation/components/lab/theming.py +74 -0
- solara/website/pages/documentation/components/lab/use_task.py +11 -0
- solara/website/pages/documentation/components/layout/__init__.py +9 -0
- solara/website/pages/documentation/components/layout/app_bar.py +16 -0
- solara/website/pages/documentation/components/layout/app_bar_title.py +16 -0
- solara/website/pages/documentation/components/layout/app_layout.py +24 -0
- solara/website/pages/documentation/components/layout/card.py +15 -0
- solara/website/pages/documentation/components/layout/card_actions.py +16 -0
- solara/website/pages/documentation/components/layout/column.py +30 -0
- solara/website/pages/documentation/components/layout/columns.py +27 -0
- solara/website/pages/documentation/components/layout/columns_responsive.py +66 -0
- solara/website/pages/documentation/components/layout/details.py +13 -0
- solara/website/pages/documentation/components/layout/griddraggable.py +62 -0
- solara/website/pages/documentation/components/layout/gridfixed.py +19 -0
- solara/website/pages/documentation/components/layout/hbox.py +18 -0
- solara/website/pages/documentation/components/layout/row.py +30 -0
- solara/website/pages/documentation/components/layout/sidebar.py +24 -0
- solara/website/pages/documentation/components/layout/vbox.py +19 -0
- solara/website/pages/documentation/components/output/__init__.py +9 -0
- solara/website/pages/documentation/components/output/file_download.py +11 -0
- solara/website/pages/documentation/components/output/html.py +19 -0
- solara/website/pages/documentation/components/output/image.py +11 -0
- solara/website/pages/documentation/components/output/markdown.py +57 -0
- solara/website/pages/documentation/components/output/markdown_editor.py +51 -0
- solara/website/pages/documentation/components/output/sql_code.py +83 -0
- solara/website/pages/documentation/components/output/tooltip.py +11 -0
- solara/website/pages/documentation/components/page/__init__.py +9 -0
- solara/website/pages/documentation/components/page/head.py +15 -0
- solara/website/pages/documentation/components/page/title.py +25 -0
- solara/website/pages/documentation/components/status/__init__.py +9 -0
- solara/website/pages/documentation/components/status/error.py +39 -0
- solara/website/pages/documentation/components/status/info.py +39 -0
- solara/website/pages/documentation/components/status/progress.py +10 -0
- solara/website/pages/documentation/components/status/spinner.py +11 -0
- solara/website/pages/documentation/components/status/success.py +40 -0
- solara/website/pages/documentation/components/status/warning.py +47 -0
- solara/website/pages/documentation/components/viz/__init__.py +9 -0
- solara/website/pages/documentation/components/viz/altair.py +42 -0
- solara/website/pages/documentation/components/viz/echarts.py +77 -0
- solara/website/pages/documentation/components/viz/matplotlib.py +30 -0
- solara/website/pages/documentation/components/viz/plotly.py +63 -0
- solara/website/pages/documentation/components/viz/plotly_express.py +41 -0
- solara/website/pages/documentation/examples/__init__.py +54 -0
- solara/website/pages/documentation/examples/ai/__init__.py +11 -0
- solara/website/pages/documentation/examples/ai/chatbot.py +113 -0
- solara/website/pages/documentation/examples/ai/tokenizer.py +107 -0
- solara/website/pages/documentation/examples/basics/__init__.py +10 -0
- solara/website/pages/documentation/examples/basics/sine.py +28 -0
- solara/website/pages/documentation/examples/fullscreen/__init__.py +10 -0
- solara/website/pages/documentation/examples/fullscreen/authorization.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/layout_demo.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/multipage.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/scatter.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/scrolling.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/tutorial_streamlit.py +3 -0
- solara/website/pages/documentation/examples/general/__init__.py +10 -0
- solara/website/pages/documentation/examples/general/custom_storage.py +70 -0
- solara/website/pages/documentation/examples/general/deploy_model.py +115 -0
- solara/website/pages/documentation/examples/general/live_update.py +32 -0
- solara/website/pages/documentation/examples/general/login_oauth.py +81 -0
- solara/website/pages/documentation/examples/general/mycard.vue +58 -0
- solara/website/pages/documentation/examples/general/pokemon_search.py +51 -0
- solara/website/pages/documentation/examples/general/vue_component.py +50 -0
- solara/website/pages/documentation/examples/ipycanvas.py +49 -0
- solara/website/pages/documentation/examples/libraries/__init__.py +10 -0
- solara/website/pages/documentation/examples/libraries/altair.py +65 -0
- solara/website/pages/documentation/examples/libraries/bqplot.py +39 -0
- solara/website/pages/documentation/examples/libraries/ipyleaflet.py +33 -0
- solara/website/pages/documentation/examples/libraries/ipyleaflet_advanced.py +66 -0
- solara/website/pages/documentation/examples/utilities/__init__.py +10 -0
- solara/website/pages/documentation/examples/utilities/calculator.py +157 -0
- solara/website/pages/documentation/examples/utilities/countdown_timer.py +62 -0
- solara/website/pages/documentation/examples/utilities/todo.py +196 -0
- solara/website/pages/documentation/examples/visualization/__init__.py +6 -0
- solara/website/pages/documentation/examples/visualization/annotator.py +67 -0
- solara/website/pages/documentation/examples/visualization/linked_views.py +81 -0
- solara/website/pages/documentation/examples/visualization/plotly.py +44 -0
- solara/website/pages/documentation/faq/__init__.py +12 -0
- solara/website/pages/documentation/faq/content/99-faq.md +112 -0
- solara/website/pages/documentation/getting_started/__init__.py +9 -0
- solara/website/pages/documentation/getting_started/content/00-quickstart.md +107 -0
- solara/website/pages/documentation/getting_started/content/01-introduction.md +125 -0
- solara/website/pages/documentation/getting_started/content/02-installing.md +134 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +14 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/10_data_science.py +13 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/20-web-app.md +89 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/30-ipywidgets.md +124 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/40-streamlit.md +146 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/50-dash.md +144 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/60-jupyter-dashboard-part1.py +65 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/SF_crime_sample.csv.gz +0 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb +445 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/_jupyter_dashboard_1.ipynb +1021 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +11 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/10-components.md +228 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/50-state-management.md +278 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +7 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/10-self-hosted.md +305 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/20-cloud-hosted.md +80 -0
- solara/website/pages/documentation/getting_started/content/80-what-is-lab.md +7 -0
- solara/website/pages/documentation/getting_started/content/90-troubleshoot.md +26 -0
- solara/website/pages/docutils.py +38 -0
- solara/website/pages/home.vue +1199 -0
- solara/website/pages/our_team/__init__.py +83 -0
- solara/website/pages/pricing/__init__.py +31 -0
- solara/website/pages/roadmap/__init__.py +11 -0
- solara/website/pages/roadmap/roadmap.md +47 -0
- solara/website/pages/scale_ipywidgets.py +45 -0
- solara/website/pages/showcase/__init__.py +105 -0
- solara/website/pages/showcase/domino_code_assist.py +60 -0
- solara/website/pages/showcase/planeto_tessa.py +19 -0
- solara/website/pages/showcase/solara_dev.py +54 -0
- solara/website/pages/showcase/solarathon_2023_team_2.py +22 -0
- solara/website/pages/showcase/solarathon_2023_team_4.py +22 -0
- solara/website/pages/showcase/solarathon_2023_team_5.py +23 -0
- solara/website/pages/showcase/solarathon_2023_team_6.py +34 -0
- solara/website/pages/showcase/wanderlust.py +27 -0
- solara/website/public/beach.jpeg +0 -0
- solara/website/public/logo.svg +6 -0
- 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/website/public/success.html +25 -0
- solara/website/templates/index.html.j2 +117 -0
- solara/website/utils.py +51 -0
- solara/widgets/__init__.py +1 -0
- solara/widgets/vue/gridlayout.vue +107 -0
- solara/widgets/vue/html.vue +4 -0
- solara/widgets/vue/navigator.vue +134 -0
- solara/widgets/vue/vegalite.vue +130 -0
- solara/widgets/widgets.py +74 -0
- solara_ui-1.45.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json +7 -0
- solara_ui-1.45.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json +7 -0
- solara_ui-1.45.0.dist-info/METADATA +162 -0
- solara_ui-1.45.0.dist-info/RECORD +464 -0
- solara_ui-1.45.0.dist-info/WHEEL +4 -0
- solara_ui-1.45.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import solara
|
|
2
|
+
|
|
3
|
+
clicks = solara.reactive(0)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@solara.component
|
|
7
|
+
def Page():
|
|
8
|
+
color = "green"
|
|
9
|
+
if clicks.value >= 5:
|
|
10
|
+
color = "red"
|
|
11
|
+
|
|
12
|
+
def increment():
|
|
13
|
+
clicks.value += 1
|
|
14
|
+
print("clicks", clicks) # noqa
|
|
15
|
+
|
|
16
|
+
solara.Button(label=f"Clicked: {clicks}", on_click=increment, color=color)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import solara
|
|
2
|
+
from solara.alias import rv
|
|
3
|
+
|
|
4
|
+
markdown_initial = """
|
|
5
|
+
# Large
|
|
6
|
+
## Smaller
|
|
7
|
+
|
|
8
|
+
## List items
|
|
9
|
+
|
|
10
|
+
* item 1
|
|
11
|
+
* item 2
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Code highlight support
|
|
15
|
+
```python
|
|
16
|
+
code = "formatted" and "supports highlighting"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
""".strip()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@solara.component
|
|
23
|
+
def MarkdownEditor():
|
|
24
|
+
markdown_text, set_markdown_text = solara.use_state(markdown_initial)
|
|
25
|
+
with solara.ColumnsResponsive(12, medium=6):
|
|
26
|
+
with solara.Column():
|
|
27
|
+
solara.Markdown("# Input text")
|
|
28
|
+
with solara.Padding(2):
|
|
29
|
+
with rv.Sheet(elevation=2):
|
|
30
|
+
rv.Textarea(v_model=markdown_text, on_v_model=set_markdown_text, rows=20)
|
|
31
|
+
with solara.Column():
|
|
32
|
+
solara.Markdown("# Renders like")
|
|
33
|
+
with solara.Padding(2):
|
|
34
|
+
solara.Markdown(markdown_text)
|
|
35
|
+
with solara.Sidebar():
|
|
36
|
+
with solara.Row():
|
|
37
|
+
solara.Button("Clear", on_click=lambda: set_markdown_text(""))
|
|
38
|
+
solara.Button("Reset ", on_click=lambda: set_markdown_text(markdown_initial))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# create an alias of the Markdown Editor component so Solara can find it
|
|
42
|
+
Page = MarkdownEditor
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v2.3.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-yaml
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
- repo: https://github.com/psf/black
|
|
9
|
+
rev: 22.3.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: black
|
|
12
|
+
language_version: python3.8
|
|
13
|
+
- repo: https://gitlab.com/pycqa/flake8
|
|
14
|
+
rev: 4.0.1
|
|
15
|
+
hooks:
|
|
16
|
+
- id: flake8
|
|
17
|
+
- repo: https://github.com/PyCQA/isort
|
|
18
|
+
rev: 5.10.1
|
|
19
|
+
hooks:
|
|
20
|
+
- id: isort
|
|
21
|
+
files: \.py$
|
|
22
|
+
args: [--profile=black]
|
|
23
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
24
|
+
rev: "v0.942" # Use the sha / tag you want to point at
|
|
25
|
+
hooks:
|
|
26
|
+
- id: mypy
|
|
27
|
+
args: [--no-strict-optional, --ignore-missing-imports]
|
|
28
|
+
additional_dependencies: [types-requests, types-markdown]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# heroku by default sets WEB_CONCURRENCY=2
|
|
2
|
+
# see: https://devcenter.heroku.com/changelog-items/618
|
|
3
|
+
# which uvicorn picks up, unless we explicitly set --workers --1
|
|
4
|
+
# see https://www.uvicorn.org/deployment/
|
|
5
|
+
# we do not support multiple workers yet
|
|
6
|
+
# we also need to bind to 0.0.0.0 otherwise heroku cannot route to our server
|
|
7
|
+
web: solara run solara_portal.pages --port=$PORT --no-open --host=0.0.0.0 --workers 1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling==1.26.3"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "solara-portal"
|
|
7
|
+
license = {file = "LICENSE"}
|
|
8
|
+
classifiers = ["License :: OSI Approved :: MIT License"]
|
|
9
|
+
dynamic = ["version", "description"]
|
|
10
|
+
dependencies = [
|
|
11
|
+
"solara",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[tool.hatch.version]
|
|
15
|
+
path = "solara_portal/__init__.py"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Home = "https://www.github.com/widgetti/solara"
|
|
21
|
+
|
|
22
|
+
[tool.black]
|
|
23
|
+
line-length = 160
|
|
24
|
+
|
|
25
|
+
[tool.isort]
|
|
26
|
+
profile = "black"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import reacton.ipyvuetify as rv
|
|
2
|
+
import solara
|
|
3
|
+
|
|
4
|
+
from ..data import articles
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@solara.component
|
|
8
|
+
def ArticleCard(name):
|
|
9
|
+
article = articles[name]
|
|
10
|
+
with rv.Card(max_width="400px") as main:
|
|
11
|
+
with solara.Link(f"/article/{name}"):
|
|
12
|
+
rv.Img(height="250", src=article.image_url)
|
|
13
|
+
rv.CardTitle(children=[article.title])
|
|
14
|
+
with rv.CardText():
|
|
15
|
+
solara.Markdown(article.description)
|
|
16
|
+
with solara.Link(f"/article/{name}"):
|
|
17
|
+
solara.Button("Read article", text=True, icon_name="mdi-book-open")
|
|
18
|
+
return main
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@solara.component
|
|
22
|
+
def Overview():
|
|
23
|
+
with solara.ColumnsResponsive(12) as main:
|
|
24
|
+
with solara.Card("Company articles"):
|
|
25
|
+
with solara.ColumnsResponsive(12, small=6, large=4):
|
|
26
|
+
for name in articles:
|
|
27
|
+
ArticleCard(name)
|
|
28
|
+
return main
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import reacton.ipyvuetify as rv
|
|
2
|
+
import solara
|
|
3
|
+
|
|
4
|
+
from ..data import dfs
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@solara.component
|
|
8
|
+
def DataCard(name):
|
|
9
|
+
df = dfs[name].df
|
|
10
|
+
with rv.Card(max_width="400px") as main:
|
|
11
|
+
with solara.Link(f"/tabular/{name}"):
|
|
12
|
+
rv.Img(height="250", src=dfs[name].image_url)
|
|
13
|
+
rv.CardTitle(children=[dfs[name].title])
|
|
14
|
+
with rv.CardText():
|
|
15
|
+
solara.Markdown(f"*{len(df):,} rows*")
|
|
16
|
+
with solara.Link(f"/tabular/{name}"):
|
|
17
|
+
solara.Button("Open table view", text=True, icon_name="mdi-table")
|
|
18
|
+
return main
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@solara.component
|
|
22
|
+
def Overview():
|
|
23
|
+
with solara.ColumnsResponsive(12) as main:
|
|
24
|
+
with solara.Card("Datasets"):
|
|
25
|
+
with solara.ColumnsResponsive(12, small=6, large=4):
|
|
26
|
+
for name in dfs:
|
|
27
|
+
DataCard(name)
|
|
28
|
+
return main
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
author: maarten
|
|
3
|
+
title: Equis in vidi
|
|
4
|
+
description: Equis in vidi
|
|
5
|
+
image: https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2500&q=80
|
|
6
|
+
thumbnail: https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=350&q=80
|
|
7
|
+
alt: "Equis in vidi"
|
|
8
|
+
createdAt: 2021-03-9
|
|
9
|
+
duration: 6 min read
|
|
10
|
+
category:
|
|
11
|
+
- general
|
|
12
|
+
---
|
|
13
|
+
# Equis in vidi
|
|
14
|
+
|
|
15
|
+
## Hoc adducere premunt
|
|
16
|
+
|
|
17
|
+
Lorem markdownum propter limite aetas contenta servatrix *perpetuaque potest*
|
|
18
|
+
oculis paventem omnem; pater. Spatium tamen poterant habuit in excita et ignibus
|
|
19
|
+
relevat voluptas, Diana praesensque sonarent. AI eventu, ire ratus ostendens
|
|
20
|
+
totiens Attonitae tinus in, fratrem. Loqui qui divum plaudenda concrescere in
|
|
21
|
+
nova, amplectitur liquidas prendique rigidas terrae seque haut putat deprendit
|
|
22
|
+
Eurynome Sol gens?
|
|
23
|
+
|
|
24
|
+
jsf *= vfatAnalogQuery;
|
|
25
|
+
if (1 != server_pipeline) {
|
|
26
|
+
executable_partition_chipset += bar(server_vle_website, ict);
|
|
27
|
+
android = module_uddi_mouse + bitImpactInput;
|
|
28
|
+
} else {
|
|
29
|
+
white_cc_smartphone(40673 + igp, filenameAccess, plugSyntaxZone(monitor,
|
|
30
|
+
955493));
|
|
31
|
+
sequencePcCopyright.management = up_lifo(wimax, pitch, pointEsports);
|
|
32
|
+
}
|
|
33
|
+
if (microcomputer) {
|
|
34
|
+
controlTraceroute = 1;
|
|
35
|
+
} else {
|
|
36
|
+
key.vlb_lamp_e -= xml_gigabit + real;
|
|
37
|
+
animated_burn += ping_olap_apache;
|
|
38
|
+
}
|
|
39
|
+
if (serp(encryption_internet.sdk.wais_floppy_node(3, adapter,
|
|
40
|
+
dns_reimage_pack), microphone_namespace * guid, pageMetal)) {
|
|
41
|
+
qbeNetworkProtocol.fiber_drive += domain(ieeeAccess);
|
|
42
|
+
crt *= exploit_meme + art;
|
|
43
|
+
} else {
|
|
44
|
+
moodle -= ccd_cgi_cursor;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
## Ara moras
|
|
48
|
+
|
|
49
|
+
Et senectae [nostrum exigui et](http://misererefuisset.org/cumacuta) et ergo ut
|
|
50
|
+
vitae labare, sed sive ubi, tot dea? Tollere abit. Gravis maternaque tendens
|
|
51
|
+
quamquam Phaeocomes mihi tendens saltem; atque sunt gemina cetera, dixit
|
|
52
|
+
gratissima oculos. Urbem Euboea *et* putes in magnanimus quae Chersidamante
|
|
53
|
+
procul, ait viri fictumque relinquet arce, ire.
|
|
54
|
+
|
|
55
|
+
## Tamen vero torquet tibi
|
|
56
|
+
|
|
57
|
+
Quaque studio, et Iuppiter, sui, pro Erycis nec somnique protinus caelo,
|
|
58
|
+
comitata. *Et* fata lacrimas vis hanc, pede cursu Quirini unam!
|
|
59
|
+
|
|
60
|
+
var httpsMeta = cyberspace_post + white_srgb + bot_compression / -5 + -2;
|
|
61
|
+
minisite_lifo_sound(isa(clean, 79) * 3);
|
|
62
|
+
if (fontNewsgroup) {
|
|
63
|
+
website.gigabit_frozen_spam(card_balancing, viral_market,
|
|
64
|
+
tftPlagiarismChecksum);
|
|
65
|
+
data.fullPython(icmp(matrix_cd), 3);
|
|
66
|
+
}
|
|
67
|
+
qwerty.opticalOpticalUnmount += drop_cisc + promptNewsgroup - winsock;
|
|
68
|
+
lion_mainframe_key = key;
|
|
69
|
+
|
|
70
|
+
## Imbres abiit
|
|
71
|
+
|
|
72
|
+
Rata ipsi ieiunia potentia tibi, qui morte brevi carina [processit geminato
|
|
73
|
+
Aeacide](http://pro.org/induitur-nisi), auribus. Mero eram Numici iactantem
|
|
74
|
+
velles vetat lustra busta iussit concubitusque timor altis solvit *bene*!
|
|
75
|
+
Caelumque concipiunt moveri unus. In magna habenas querenda in florentia hiems
|
|
76
|
+
vetat tam habebam ignes Latoius, maxima primoque.
|
|
77
|
+
|
|
78
|
+
Oceano laboriferi dicentum Veneris donec, veniam pectine vota retusa. Vacca quis
|
|
79
|
+
non cuius collesque in ortas Olenos tenuere sit genitor ut quisque Laomedonve
|
|
80
|
+
teste, uterque Deucalion auro, qui. Mixtos est, et tibi mihi sum.
|
|
81
|
+
|
|
82
|
+
Urbe huic soporem. Sine optima secuta, ante ignarus currus [parabant
|
|
83
|
+
robore](http://haemoniae-quique.io/portas-cecidere) corpore tremens qui erat
|
|
84
|
+
aura mediusque **virgo**, iactis quae vellera. Dixerat ferebat siccaeque
|
|
85
|
+
penetralia oculis, est umeroque hic vero. Modo tempora fuit.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
author: jovan
|
|
3
|
+
title: Substiterat vati
|
|
4
|
+
description: Substiterat vati
|
|
5
|
+
thumbnail: https://miro.medium.com/max/350/1*oC9sUtSrHmvv23yYSg__LA.jpeg
|
|
6
|
+
image: https://miro.medium.com/max/1350/1*oC9sUtSrHmvv23yYSg__LA.jpeg
|
|
7
|
+
alt: "Substiterat vati"
|
|
8
|
+
createdAt: 2020-02-17
|
|
9
|
+
duration: 6 min read
|
|
10
|
+
category:
|
|
11
|
+
- general
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Substiterat vati
|
|
15
|
+
|
|
16
|
+
## Porrigis cecinit absentes
|
|
17
|
+
|
|
18
|
+
Lorem markdownum infelix **caeli**, quaeque molitur; Thyesteis gerunt ab urbem.
|
|
19
|
+
Cum docta et creditur utrumque inmisit regem modo similes acceptaque forte. Ne
|
|
20
|
+
facesque, et egredior, aut libera iaculum, morem. Maius peperisse floribus
|
|
21
|
+
dapibus ad reparare lintea, [illa mente](http://in.com/nautas) superi avis; vix
|
|
22
|
+
reppulit! Alium faciebat, suo sed dignus et, fuit apte sacra ad!
|
|
23
|
+
|
|
24
|
+
1. Gemitu gloria et sed iste ulla delubra
|
|
25
|
+
2. Petraeum in patria coniunx mare quod plenaque
|
|
26
|
+
3. Pecudis attonitos perdam monstris passim non plumbo
|
|
27
|
+
4. Gemino serpentis aditum cuius se novitate et
|
|
28
|
+
5. Nihil aeraque hostem deus vehit pharetra
|
|
29
|
+
6. Sic inde labori inaniter gelidae transferre radium
|
|
30
|
+
|
|
31
|
+
Pronumque regna da congestaque iuvenalis formae! Umeris eodem sinumque viscera.
|
|
32
|
+
Ille nymphe; poma filia, quam miserum traho certis Atridae. Vi habet, addit
|
|
33
|
+
nomen venit. Quoque **convertor vestigia** iura, sum inquire sexangula equorum
|
|
34
|
+
invenio, plumis cristis exarsit et terga, praecordia.
|
|
35
|
+
|
|
36
|
+
## Illi rursus
|
|
37
|
+
|
|
38
|
+
Sibila petit amare visa Ulixem, est, ab tamen. Animalia **non prolem omnia**
|
|
39
|
+
adplicor in certa flerunt?
|
|
40
|
+
|
|
41
|
+
Habes nova corpora, nobis solidumque nostri et solvit, ater illis Palladis vatum
|
|
42
|
+
Crocon cadunt mixta caelum subitusque tegmine! Ponderis onere, dignare detrusit
|
|
43
|
+
femineae annis: non quae Actaea magni ille, corpusque. Crimine negabamus Lydas
|
|
44
|
+
lacusque colus aquosis vocis retinacula figentem nubes pallet; quod intrat
|
|
45
|
+
nostra nos secreta nostro, Titan? Non Bromiumque possunt nunc per, et plebe
|
|
46
|
+
quamvis antra huc prodere stant.
|
|
47
|
+
|
|
48
|
+
Orbem sollicitae **Ganymedis** carinis ulli Mavortis Iuppiter cavas, iam Ascanii
|
|
49
|
+
[vindicta](http://extemplo.io/gelido.html). Vident quid iste cum Styga primum
|
|
50
|
+
ignavi genitoris effugit falsum nova est. Novitate quos retro compos sarisa et
|
|
51
|
+
[sanguine](http://anno-carpit.org/), ferre manus praestet praevisos numeratur
|
|
52
|
+
Aeson et o nec.
|
|
53
|
+
|
|
54
|
+
## Concepit lymphata in isque iamdudum ituras iuga
|
|
55
|
+
|
|
56
|
+
Morisque cum: uni rauca cantus sed nomine, *reditum* inspiratque dedit
|
|
57
|
+
**abstulerit ungulaque**. Usus parantem oriuntur reminiscitur quot vulnera
|
|
58
|
+
hominis cuspis!
|
|
59
|
+
|
|
60
|
+
Tulit medicamina Nycteliusque *socero*, latens dixerat **sic Actaeas** oculos
|
|
61
|
+
sub plenissima felix. Heliadum [Tyrrhenaque](http://oad.com/medio.html) terras
|
|
62
|
+
siqua infelix ultra, adsunt eurus infelix cum: si aethere **locum** permiscuit
|
|
63
|
+
sustinet Helopsque osculaque.
|
|
64
|
+
|
|
65
|
+
Hunc ille murmure candore et mecum conchaeque dumque corpore in lati sortita;
|
|
66
|
+
atra nata! Fortes quisquam iudice cavata: genitas desilit conspecta ad ante
|
|
67
|
+
possidet tenet *enim dixit*? Memoratis nec ira triceps **primus**. Moliri
|
|
68
|
+
aequaret ope sedes ore aliena siquidem se timuit hostem, carina sequantur
|
|
69
|
+
*concita invisumque vestes* signataque amoris, mandabat. Ortu iam ora reicere
|
|
70
|
+
Isthmo: fremebant spoliavit.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import dataclasses
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Any, Dict
|
|
4
|
+
|
|
5
|
+
import vaex.datasets
|
|
6
|
+
import yaml
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclasses.dataclass
|
|
10
|
+
class DataFrame:
|
|
11
|
+
title: str
|
|
12
|
+
df: Any
|
|
13
|
+
image_url: str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
dfs = {
|
|
17
|
+
"titanic": DataFrame(
|
|
18
|
+
df=vaex.datasets.titanic(),
|
|
19
|
+
title="Titanic",
|
|
20
|
+
image_url="https://images.unsplash.com/photo-1561625116-df74735458a5?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3574&q=80", # noqa
|
|
21
|
+
),
|
|
22
|
+
"iris": DataFrame(
|
|
23
|
+
df=vaex.datasets.iris(),
|
|
24
|
+
title="Iris",
|
|
25
|
+
image_url="https://images.unsplash.com/photo-1540163502599-a3284e17072d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3870&q=80", # noqa
|
|
26
|
+
),
|
|
27
|
+
# uncomment for a larger dataset to be included
|
|
28
|
+
# "taxi": DataFrame(
|
|
29
|
+
# df=vaex.datasets.taxi(),
|
|
30
|
+
# title="New York Taxi",
|
|
31
|
+
# image_url="https://images.unsplash.com/photo-1514749204155-24e484635226?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1587&q=80", # noqa
|
|
32
|
+
# ),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
names = list(dfs)
|
|
36
|
+
# def load(name):
|
|
37
|
+
# if name == "titanic"
|
|
38
|
+
|
|
39
|
+
HERE = Path(__file__)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclasses.dataclass
|
|
43
|
+
class Article:
|
|
44
|
+
markdown: str
|
|
45
|
+
title: str
|
|
46
|
+
description: str
|
|
47
|
+
image_url: str
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
articles: Dict[str, Article] = {}
|
|
51
|
+
|
|
52
|
+
for file in (HERE.parent / "content/articles").glob("*.md"):
|
|
53
|
+
content = file.read_text()
|
|
54
|
+
lines = [k.strip() for k in content.split("\n")]
|
|
55
|
+
frontmatter_start = lines.index("---", 0)
|
|
56
|
+
frontmatter_end = lines.index("---", frontmatter_start + 1)
|
|
57
|
+
yamltext = "\n".join(lines[frontmatter_start + 1 : frontmatter_end - 2])
|
|
58
|
+
metadata = yaml.safe_load(yamltext)
|
|
59
|
+
markdown = "\n".join(lines[frontmatter_end + 1 :])
|
|
60
|
+
articles[file.stem] = Article(markdown=markdown, title=metadata["title"], description=metadata["description"], image_url=metadata["image"])
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import solara
|
|
2
|
+
from solara.alias import rv
|
|
3
|
+
|
|
4
|
+
from ..components import article, data
|
|
5
|
+
from ..data import articles, names
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@solara.component
|
|
9
|
+
def PeopleCard(name):
|
|
10
|
+
with solara.Card(f"Employee of the Month: {name}") as main:
|
|
11
|
+
with rv.CardText():
|
|
12
|
+
solara.Markdown(
|
|
13
|
+
"""
|
|
14
|
+
* Department: foo
|
|
15
|
+
* Skills: bar, baz
|
|
16
|
+
"""
|
|
17
|
+
)
|
|
18
|
+
with solara.Link(f"/people/{name}"):
|
|
19
|
+
solara.Button("View employee", text=True, icon_name="mdi-profile")
|
|
20
|
+
return main
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@solara.component
|
|
24
|
+
def Layout(children=[]):
|
|
25
|
+
router = solara.use_context(solara.routing.router_context)
|
|
26
|
+
with solara.VBox() as navigation:
|
|
27
|
+
with rv.List(dense=True):
|
|
28
|
+
with rv.ListItemGroup(v_model=router.path):
|
|
29
|
+
with solara.Link(solara.resolve_path("/")):
|
|
30
|
+
with solara.ListItem("Home", icon_name="mdi-home", value="/"):
|
|
31
|
+
pass
|
|
32
|
+
with solara.ListItem("tabular data", icon_name="mdi-database"):
|
|
33
|
+
for name in names:
|
|
34
|
+
pathname = f"/tabular/{name}"
|
|
35
|
+
with solara.Link(solara.resolve_path(pathname)):
|
|
36
|
+
solara.ListItem(name, value=pathname)
|
|
37
|
+
with solara.ListItem("Articles", icon_name="mdi-book-open"):
|
|
38
|
+
for name, article_ in articles.items():
|
|
39
|
+
pathname = f"/article/{name}"
|
|
40
|
+
with solara.Link(solara.resolve_path(pathname)):
|
|
41
|
+
solara.ListItem(article_.title, value=pathname)
|
|
42
|
+
|
|
43
|
+
with solara.AppLayout(navigation=navigation, title="Solara demo", children=children) as main:
|
|
44
|
+
pass
|
|
45
|
+
return main
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@solara.component
|
|
49
|
+
def Page():
|
|
50
|
+
with solara.VBox() as main:
|
|
51
|
+
solara.Title("Solara demo » Home")
|
|
52
|
+
data.Overview()
|
|
53
|
+
article.Overview()
|
|
54
|
+
|
|
55
|
+
with solara.ColumnsResponsive(12):
|
|
56
|
+
with solara.Card("Other"):
|
|
57
|
+
with solara.ColumnsResponsive(6):
|
|
58
|
+
PeopleCard("Maarten Breddels")
|
|
59
|
+
with solara.Card("Quick links"):
|
|
60
|
+
with solara.Column():
|
|
61
|
+
for name in names:
|
|
62
|
+
with solara.Link(f"/viz/scatter/{name}"):
|
|
63
|
+
solara.Button(f"Scatter for {name}", text=True)
|
|
64
|
+
with solara.Link(f"/viz/histogram/{name}"):
|
|
65
|
+
solara.Button(f"Histogram for {name}", text=True)
|
|
66
|
+
|
|
67
|
+
return main
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import solara
|
|
4
|
+
|
|
5
|
+
from ... import data
|
|
6
|
+
from ...components.article import Overview
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@solara.component
|
|
10
|
+
def Page(name: Optional[str] = None, page: int = 0, page_size=100):
|
|
11
|
+
if name is None:
|
|
12
|
+
with solara.Column() as main:
|
|
13
|
+
solara.Title("Solara demo » Articles")
|
|
14
|
+
Overview()
|
|
15
|
+
return main
|
|
16
|
+
if name not in data.articles:
|
|
17
|
+
return solara.Error(f"No such article: {name!r}")
|
|
18
|
+
article = data.articles[name]
|
|
19
|
+
with solara.ColumnsResponsive(12) as main:
|
|
20
|
+
solara.Title("Solara demo » Article » " + article.title)
|
|
21
|
+
with solara.Link("/article"):
|
|
22
|
+
solara.Text("« Back to overview")
|
|
23
|
+
with solara.Card():
|
|
24
|
+
pre = f"# {article.title}\n\n"
|
|
25
|
+
solara.Markdown(pre + article.markdown)
|
|
26
|
+
return main
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""This Page takes an extra argument, meaning that it can cache urls like /tabular/titanic
|
|
2
|
+
and pass the last part of the url as argument to the Page component, so we can render content
|
|
3
|
+
dynamically.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
import solara
|
|
9
|
+
|
|
10
|
+
from .. import data
|
|
11
|
+
from ..components import data as data_components
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@solara.component
|
|
15
|
+
def Page(name: Optional[str] = None, page: int = 0, page_size=100):
|
|
16
|
+
if name is None or name not in data.dfs:
|
|
17
|
+
with solara.Column() as main:
|
|
18
|
+
solara.Title("Solara demo » table view")
|
|
19
|
+
data_components.Overview()
|
|
20
|
+
return main
|
|
21
|
+
|
|
22
|
+
df = data.dfs[name].df
|
|
23
|
+
with solara.ColumnsResponsive(12) as main:
|
|
24
|
+
with solara.Link("/tabular"):
|
|
25
|
+
solara.Text("« Back to overview")
|
|
26
|
+
solara.DataTable(df=df, page=page, items_per_page=page_size)
|
|
27
|
+
with solara.Head():
|
|
28
|
+
solara.Title(f"Solara demo » table view » {name}")
|
|
29
|
+
return main
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""This Page components sets in the package root and takes two non-optional arguments,
|
|
2
|
+
meaning it will catch urls like /viz/scatter/titanic and pass two argument to the Page component,
|
|
3
|
+
so we can render content dynamically.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
import plotly.express as px
|
|
9
|
+
import solara
|
|
10
|
+
|
|
11
|
+
from ... import data
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def title(type: str, name: str):
|
|
15
|
+
return f"Solara viz view: {type} - {name}"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@solara.component
|
|
19
|
+
def Page(type: Optional[str] = None, name: Optional[str] = None, x: Optional[str] = None, y: Optional[str] = None):
|
|
20
|
+
type, set_type = solara.use_state_or_update(type)
|
|
21
|
+
name, set_name = solara.use_state_or_update(name)
|
|
22
|
+
x, set_x = solara.use_state_or_update(x)
|
|
23
|
+
y, set_y = solara.use_state_or_update(y)
|
|
24
|
+
|
|
25
|
+
with solara.ColumnsResponsive(12) as main:
|
|
26
|
+
if type is None:
|
|
27
|
+
type = "scatter"
|
|
28
|
+
set_type("scatter")
|
|
29
|
+
with solara.Sidebar():
|
|
30
|
+
with solara.Card("Viz configuration"):
|
|
31
|
+
solara.Select(label="dataset", value=name, values=list(data.dfs), on_value=set_name)
|
|
32
|
+
solara.ToggleButtonsSingle(value=type, values=["scatter", "histogram"], on_value=set_type)
|
|
33
|
+
if name not in data.dfs:
|
|
34
|
+
set_name(list(data.dfs)[0])
|
|
35
|
+
if name in data.dfs:
|
|
36
|
+
df = data.dfs[name].df
|
|
37
|
+
column_names = df.get_column_names()
|
|
38
|
+
df = df.to_pandas_df()
|
|
39
|
+
if x not in column_names:
|
|
40
|
+
set_x(column_names[0])
|
|
41
|
+
if y not in column_names:
|
|
42
|
+
set_y(column_names[1])
|
|
43
|
+
if x not in column_names:
|
|
44
|
+
set_x(column_names[0])
|
|
45
|
+
if y not in column_names:
|
|
46
|
+
set_y(column_names[1])
|
|
47
|
+
solara.Title(f"Solara demo » viz » {type} » {name}")
|
|
48
|
+
fig = None
|
|
49
|
+
if type == "scatter":
|
|
50
|
+
with solara.Sidebar():
|
|
51
|
+
with solara.Card("Columns"):
|
|
52
|
+
solara.Select(label="x", value=x, values=column_names, on_value=set_x)
|
|
53
|
+
solara.Select(label="y", value=y, values=column_names, on_value=set_y)
|
|
54
|
+
if x and y and x in column_names and y in column_names:
|
|
55
|
+
fig = px.scatter(df, x=x, y=y)
|
|
56
|
+
else:
|
|
57
|
+
solara.Warning("Please provide x and y")
|
|
58
|
+
elif type == "histogram":
|
|
59
|
+
with solara.Sidebar():
|
|
60
|
+
with solara.Card("Columns"):
|
|
61
|
+
solara.Select(label="x", value=x, values=column_names, on_value=set_x)
|
|
62
|
+
if x and x in column_names:
|
|
63
|
+
fig = px.histogram(df, x=x)
|
|
64
|
+
else:
|
|
65
|
+
solara.Warning("Please provide x")
|
|
66
|
+
else:
|
|
67
|
+
solara.Error("Uknonwn ")
|
|
68
|
+
if fig:
|
|
69
|
+
solara.FigurePlotly(fig, dependencies=[name, type, x, y])
|
|
70
|
+
return main
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import solara
|
|
2
|
+
|
|
3
|
+
from ... import data
|
|
4
|
+
from ...components import Layout
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@solara.component
|
|
8
|
+
def Page(name: str, page: int = 0, page_size=100):
|
|
9
|
+
if name not in data.dfs:
|
|
10
|
+
return solara.Error(f"No such dataframe: {name!r}")
|
|
11
|
+
df = data.dfs[name]
|
|
12
|
+
with Layout() as main:
|
|
13
|
+
solara.DataTable(df=df, page=page, items_per_page=page_size)
|
|
14
|
+
return main
|
solara/test/__init__.py
ADDED
|
File without changes
|