streamlit-jupyter


Namestreamlit-jupyter JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/ddobrinskiy/streamlit-jupyter
SummarySimple Python package to preview and develop streamlit apps in jupyter notebooks
upload_time2025-07-22 12:53:00
maintainerNone
docs_urlNone
authorDavid Dobrinskiy
requires_python>=3.8
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # streamlit-jupyter


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

<img src="./images/logo.png" width=99%>

[![CI
Badge](https://github.com/ddobrinskiy/streamlit-jupyter/actions/workflows/test.yaml/badge.svg)](https://github.com/ddobrinskiy/streamlit-jupyter/actions)
[![Open Streamlit
App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://ddobrinskiy-jupyter.streamlit.app/)

## Docs & links

- Detailed docs for this library can be found at
  [ddobrinskiy.github.io/streamlit-jupyter](https://ddobrinskiy.github.io/streamlit-jupyter)

- ToDos on [github
  project](https://github.com/users/ddobrinskiy/projects/4/views/1)

- The rest of this README provides a quick overview of the library.

## Install

``` sh
pip install streamlit_jupyter
```

## How to use

Take a look at our [example notebook](./examples/99_example.ipynb),
streamlit version runs
[here](https://ddobrinskiy-jupyter.streamlit.app/)

The main idea is for you do experiment and develop in your notebook,
visually see all the pieces, and then convert the notebook to `.py` to
be run by streamlit

start by importing streamlit and patching it with streamlit-jupyter:

``` python
import streamlit as st

from streamlit_jupyter import StreamlitPatcher, tqdm

StreamlitPatcher().jupyter()  # register streamlit with jupyter-compatible wrappers
```

And now develop your notebook as usual, but with the ability to use
Streamlit widgets and components.

See how it works below, and check out the [example
notebook](./examples/99_example.ipynb)

## Currently supported methods

Refer to excellent [streamlit
docs](https://docs.streamlit.io/library/api-reference) for more details
on each method

| method | docstring |
|:---|:---|
| `st.cache_data` | Implements the public st.cache_data API: the @st.cache_data decorator, and |
| `st.cache_resource` | Implements the public st.cache_resource API: the @st.cache_resource decorator, |
| `st.cache` | Legacy caching decorator (deprecated). |
| `st.caption` | Display text in small font. |
| `st.checkbox` | Display a checkbox widget. |
| `st.code` | Display a code block with optional syntax highlighting. |
| `st.data_editor` | Display a data editor widget. |
| `st.dataframe` | Display a dataframe as an interactive table. |
| `st.date_input` | Display a date input widget. |
| `st.expander` | Insert a multi-element container that can be expanded/collapsed. |
| `st.header` | Display text in header formatting. |
| `st.json` | Display object or string as a pretty-printed JSON string. |
| `st.latex` | Display mathematical expressions formatted as LaTeX. |
| `st.markdown` | Display string formatted as Markdown. |
| `st.metric` | Display a metric in big bold font, with an optional indicator of how the metric changed. |
| `st.multiselect` | Display a multiselect widget. |
| `st.radio` | Display a radio button widget. |
| `st.selectbox` | Display a select widget. |
| `st.subheader` | Display text in subheader formatting. |
| `st.text_area` | Display a multi-line text input widget. |
| `st.text_input` | Display a single-line text input widget. |
| `st.text` | Write fixed-width and preformatted text. |
| `st.title` | Display text in title formatting. |
| `st.write` | Write arguments to the app. |

## Currently **un**supported methods

Most of the other methods are not supported yet.

If you need any of them, you have one of 2 options:

- please open an issue or a PR

- use them in your notebook regardless, they will still work once you
  convert your notebook to streamlit. You just won’t be able to preview
  them in jupyter.

## How to contribute

To start with you need to create virtualenv with pipenv tool and the
libraries from Pipfile:

``` shell
pipenv shell 
pipenv install -d 
```

Install quatro, if you have Mac OS use homebrew:

``` shell
brew install quarto
```

otherwise, check https://quarto.org/docs/download/

The next step is to install streamlit-jupyter from the repo

``` shell
pip install -e "[dev]"
```

now you are all set, you can refer to Makefile to see examples with
streamlit-jupyter. Simply run a command:

``` shell
make all
```

## Demonstration

|  | <img src="./images/favicon_jupyter.ico" width="30" /> Jupyter | <img src="./images/favicon_streamlit.ico" height="25" /> Streamlit |
|:--:|:--:|:--:|
| Markdown and headings | ![alt](images/img1_jupyter.png) | ![alt](images/img1_streamlit.png) |
| Interactive data entry | ![alt](images/img2_jupyter.png) | ![alt](images/img2_streamlit.png) |
| Pick and choose | ![alt](images/img5_jupyter.gif) | ![alt](images/img5_streamlit.gif) |
| Dataframes, caching and progress bars | ![alt](images/img3_jupyter.gif) | ![alt](images/img3_streamlit.gif) |
| Plots | ![alt](images/img4_jupyter.png) | ![alt](images/img4_streamlit.png) |
| Metrics | ![alt](images/img6_jupyter.png) | ![alt](images/img6_streamlit.png) |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ddobrinskiy/streamlit-jupyter",
    "name": "streamlit-jupyter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "nbdev jupyter notebook python",
    "author": "David Dobrinskiy",
    "author_email": "david@dobrinskiy.me",
    "download_url": "https://files.pythonhosted.org/packages/ee/da/a47e9530b5868baa4b266e2c3097d37f8d461def358291b60c2c30eacb4a/streamlit_jupyter-0.3.1.tar.gz",
    "platform": null,
    "description": "# streamlit-jupyter\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n<img src=\"./images/logo.png\" width=99%>\n\n[![CI\nBadge](https://github.com/ddobrinskiy/streamlit-jupyter/actions/workflows/test.yaml/badge.svg)](https://github.com/ddobrinskiy/streamlit-jupyter/actions)\n[![Open Streamlit\nApp](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://ddobrinskiy-jupyter.streamlit.app/)\n\n## Docs & links\n\n- Detailed docs for this library can be found at\n  [ddobrinskiy.github.io/streamlit-jupyter](https://ddobrinskiy.github.io/streamlit-jupyter)\n\n- ToDos on [github\n  project](https://github.com/users/ddobrinskiy/projects/4/views/1)\n\n- The rest of this README provides a quick overview of the library.\n\n## Install\n\n``` sh\npip install streamlit_jupyter\n```\n\n## How to use\n\nTake a look at our [example notebook](./examples/99_example.ipynb),\nstreamlit version runs\n[here](https://ddobrinskiy-jupyter.streamlit.app/)\n\nThe main idea is for you do experiment and develop in your notebook,\nvisually see all the pieces, and then convert the notebook to `.py` to\nbe run by streamlit\n\nstart by importing streamlit and patching it with streamlit-jupyter:\n\n``` python\nimport streamlit as st\n\nfrom streamlit_jupyter import StreamlitPatcher, tqdm\n\nStreamlitPatcher().jupyter()  # register streamlit with jupyter-compatible wrappers\n```\n\nAnd now develop your notebook as usual, but with the ability to use\nStreamlit widgets and components.\n\nSee how it works below, and check out the [example\nnotebook](./examples/99_example.ipynb)\n\n## Currently supported methods\n\nRefer to excellent [streamlit\ndocs](https://docs.streamlit.io/library/api-reference) for more details\non each method\n\n| method | docstring |\n|:---|:---|\n| `st.cache_data` | Implements the public st.cache_data API: the @st.cache_data decorator, and |\n| `st.cache_resource` | Implements the public st.cache_resource API: the @st.cache_resource decorator, |\n| `st.cache` | Legacy caching decorator (deprecated). |\n| `st.caption` | Display text in small font. |\n| `st.checkbox` | Display a checkbox widget. |\n| `st.code` | Display a code block with optional syntax highlighting. |\n| `st.data_editor` | Display a data editor widget. |\n| `st.dataframe` | Display a dataframe as an interactive table. |\n| `st.date_input` | Display a date input widget. |\n| `st.expander` | Insert a multi-element container that can be expanded/collapsed. |\n| `st.header` | Display text in header formatting. |\n| `st.json` | Display object or string as a pretty-printed JSON string. |\n| `st.latex` | Display mathematical expressions formatted as LaTeX. |\n| `st.markdown` | Display string formatted as Markdown. |\n| `st.metric` | Display a metric in big bold font, with an optional indicator of how the metric changed. |\n| `st.multiselect` | Display a multiselect widget. |\n| `st.radio` | Display a radio button widget. |\n| `st.selectbox` | Display a select widget. |\n| `st.subheader` | Display text in subheader formatting. |\n| `st.text_area` | Display a multi-line text input widget. |\n| `st.text_input` | Display a single-line text input widget. |\n| `st.text` | Write fixed-width and preformatted text. |\n| `st.title` | Display text in title formatting. |\n| `st.write` | Write arguments to the app. |\n\n## Currently **un**supported methods\n\nMost of the other methods are not supported yet.\n\nIf you need any of them, you have one of 2 options:\n\n- please open an issue or a PR\n\n- use them in your notebook regardless, they will still work once you\n  convert your notebook to streamlit. You just won\u2019t be able to preview\n  them in jupyter.\n\n## How to contribute\n\nTo start with you need to create virtualenv with pipenv tool and the\nlibraries from Pipfile:\n\n``` shell\npipenv shell \npipenv install -d \n```\n\nInstall quatro, if you have Mac OS use homebrew:\n\n``` shell\nbrew install quarto\n```\n\notherwise, check https://quarto.org/docs/download/\n\nThe next step is to install streamlit-jupyter from the repo\n\n``` shell\npip install -e \"[dev]\"\n```\n\nnow you are all set, you can refer to Makefile to see examples with\nstreamlit-jupyter. Simply run a command:\n\n``` shell\nmake all\n```\n\n## Demonstration\n\n|  | <img src=\"./images/favicon_jupyter.ico\" width=\"30\" /> Jupyter | <img src=\"./images/favicon_streamlit.ico\" height=\"25\" /> Streamlit |\n|:--:|:--:|:--:|\n| Markdown and headings | ![alt](images/img1_jupyter.png) | ![alt](images/img1_streamlit.png) |\n| Interactive data entry | ![alt](images/img2_jupyter.png) | ![alt](images/img2_streamlit.png) |\n| Pick and choose | ![alt](images/img5_jupyter.gif) | ![alt](images/img5_streamlit.gif) |\n| Dataframes, caching and progress bars | ![alt](images/img3_jupyter.gif) | ![alt](images/img3_streamlit.gif) |\n| Plots | ![alt](images/img4_jupyter.png) | ![alt](images/img4_streamlit.png) |\n| Metrics | ![alt](images/img6_jupyter.png) | ![alt](images/img6_streamlit.png) |\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Simple Python package to preview and develop streamlit apps in jupyter notebooks",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/ddobrinskiy/streamlit-jupyter"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "97603bd1852e23399eb4c6702e0d8881997ca7074732fa0da345482b1d134ba7",
                "md5": "3eb83de041959b01cfcd976b23e546b2",
                "sha256": "2c84a8f0c0b6f9265a0d933dd3a83a80aeb382793810ed44f38c1748362d2f52"
            },
            "downloads": -1,
            "filename": "streamlit_jupyter-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3eb83de041959b01cfcd976b23e546b2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13362,
            "upload_time": "2025-07-22T12:52:59",
            "upload_time_iso_8601": "2025-07-22T12:52:59.959625Z",
            "url": "https://files.pythonhosted.org/packages/97/60/3bd1852e23399eb4c6702e0d8881997ca7074732fa0da345482b1d134ba7/streamlit_jupyter-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eedaa47e9530b5868baa4b266e2c3097d37f8d461def358291b60c2c30eacb4a",
                "md5": "d72de5276a66ab7c636d7d4b1b69e350",
                "sha256": "df18e09326925c931987d80ce100832b241c2e759250c749fcff71c7941abb38"
            },
            "downloads": -1,
            "filename": "streamlit_jupyter-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d72de5276a66ab7c636d7d4b1b69e350",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15649,
            "upload_time": "2025-07-22T12:53:00",
            "upload_time_iso_8601": "2025-07-22T12:53:00.947332Z",
            "url": "https://files.pythonhosted.org/packages/ee/da/a47e9530b5868baa4b266e2c3097d37f8d461def358291b60c2c30eacb4a/streamlit_jupyter-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-22 12:53:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ddobrinskiy",
    "github_project": "streamlit-jupyter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "streamlit-jupyter"
}
        
Elapsed time: 2.83378s