Title: feat(examples): Streamlit example apps over .deepnote files by voyti · Pull Request #523 · deepnote/deepnote · GitHub
Open Graph Title: feat(examples): Streamlit example apps over .deepnote files by voyti · Pull Request #523 · deepnote/deepnote
X Title: feat(examples): Streamlit example apps over .deepnote files by voyti · Pull Request #523 · deepnote/deepnote
Description: Adds Streamlit versions of the static and dynamic apps in examples/local-runner. This PR was split out of #466, which is now merged, and is rebased onto main. What examples/streamlit/: static_app.py shows the outputs saved in a snapshot. dynamic_app.py shows the notebook's inputs as widgets and runs the notebook through deepnote_toolkit.notebooks and deepnote_toolkit.streamlit. serve.mjs starts a local runner process for the dynamic app. Smoke tests, plus the example:streamlit:* and test:streamlit scripts. Why it is still a draft The apps import deepnote_toolkit.notebooks and deepnote_toolkit.streamlit. Both were merged in deepnote/deepnote-toolkit#122 but are not in a Deepnote Toolkit release yet. The latest release, 2.7.0, predates the merge. Until a release includes them, pnpm test:streamlit fails, because it installs the toolkit from PyPI. Verified The smoke tests pass against toolkit main (b6ae159, the #122 merge) on Python 3.12 and 3.14. In an offline test with network calls stubbed, the dynamic app sent DEEPNOTE_TOKEN to api.deepnote.com. With DEEPNOTE_PROJECT_ID exported, it stopped with "Could not resolve the Deepnote Streamlit app ID", as the README warns. With the local runner process (pnpm example:streamlit:runner), the app connects, the inputs match, and a run without a token fails with a clear error. On staging (toolkit b6ae159), following the README: deepnote run --cloud --push deployed the notebook to a new project, the files were uploaded, Streamlit app API access was turned on, and deepnote streamlit publish created the app and waited until it was running. A workspace admin and a workspace viewer each opened the app, connected to Deepnote Cloud and completed a run. The dashboard showed the metrics, chart, table, image and agent text. After one input was renamed in the deployed notebook, the app showed the mismatch warning and disabled the run button. Before marking ready for review A Deepnote Toolkit release that includes #122. Then pin the three uv --with scripts to it and drop the release condition from the README's test section. One live local run with an API token against a production notebook. A check on staging with a signed-out or link-only visitor. The test workspace does not allow link sharing. Notes The server gives hosted apps a viewer token only in workspaces where the rollout flag is on. Elsewhere, the token request is refused with "API access is not available for this app", and the run button stays disabled. Local runs with a token or a runner process are not affected. The run API does not show which viewer started a run, so the staging check could not confirm who each run belonged to. Summary by CodeRabbit New Features Added Streamlit examples for viewing saved notebook snapshots without network access and running notebooks dynamically, with sales metrics, regional charts, and available analysis. Dynamic runs support local or hosted runners, show run status and errors, and link to results when available. Added commands to launch the examples and run their tests. Documentation Linked the Streamlit and local runner examples from the examples guide, with guidance on setup, publishing, hosted access, and testing.
Open Graph Description: Adds Streamlit versions of the static and dynamic apps in examples/local-runner. This PR was split out of #466, which is now merged, and is rebased onto main. What examples/streamlit/: static_app....
X Description: Adds Streamlit versions of the static and dynamic apps in examples/local-runner. This PR was split out of #466, which is now merged, and is rebased onto main. What examples/streamlit/: static_app....
Opengraph URL: https://github.com/deepnote/deepnote/pull/523
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:cc9d374f-838c-9fc0-366a-08de5e1b9486 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C11E:257FA3:87C5B4:B4A106:6AEDC842 |
| html-safe-nonce | 2f097923691c5943e5bfbd212756752121011f28b51d14c45a0a32cb97c8f4e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTFFOjI1N0ZBMzo4N0M1QjQ6QjRBMTA2OjZBRURDODQyIiwidmlzaXRvcl9pZCI6IjMzNTg4MjM5ODUzMDEwMTQ1OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 77b6f198c494c3aeb5becff45c3286d59c1c6b0a8894637e8b3f3206a8494a6e |
| hovercard-subject-tag | pull_request:4559193194 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/deepnote/deepnote/pull/523/commits/b8b3547cca254badabbbb90a2474add39e7654fc |
| twitter:image | https://avatars.githubusercontent.com/u/6819634?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6819634?s=400&v=4 |
| og:image:alt | Adds Streamlit versions of the static and dynamic apps in examples/local-runner. This PR was split out of #466, which is now merged, and is rebased onto main. What examples/streamlit/: static_app.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c7d2f3ac4f4f560c56267b765892ba5b093e8a5fb2c0ed937edd8947746942e9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/deepnote/deepnote git https://github.com/deepnote/deepnote.git |
| octolytics-dimension-user_id | 45339858 |
| octolytics-dimension-user_login | deepnote |
| octolytics-dimension-repository_id | 1066509034 |
| octolytics-dimension-repository_nwo | deepnote/deepnote |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1066509034 |
| octolytics-dimension-repository_network_root_nwo | deepnote/deepnote |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0cac2d0cb993b0ad48c49b076135ac558c742c30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width