streamlit-jupyter


Namestreamlit-jupyter JSON
Version 0.1.9 PyPI version JSON
download
home_pagehttps://github.com/ddobrinskiy/streamlit-jupyter
SummarySimple Python package to preview and develop streamlit apps in jupyter notebooks
upload_time2023-02-07 16:29:48
maintainer
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%>

[<img src="https://github.com/ddobrinskiy/streamlit-jupyter/actions/workflows/test.yaml/badge.svg">](https://github.com/ddobrinskiy/streamlit-jupyter/actions)

## 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)

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`       | Function decorator to memoize function executions.                                       |
| `st.caption`     | Display text in small font.                                                              |
| `st.checkbox`    | Display a checkbox widget.                                                               |
| `st.code`        | Display a code block with optional syntax highlighting.                                  |
| `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.

## 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": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python",
    "author": "David Dobrinskiy",
    "author_email": "david@dobrinskiy.me",
    "download_url": "https://files.pythonhosted.org/packages/99/b6/6d6091977f78b2d9efef8af8246678dce46ca60d8c6d57d8a3447f4501bb/streamlit-jupyter-0.1.9.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[<img src=\"https://github.com/ddobrinskiy/streamlit-jupyter/actions/workflows/test.yaml/badge.svg\">](https://github.com/ddobrinskiy/streamlit-jupyter/actions)\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)\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`       | Function decorator to memoize function executions.                                       |\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.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## 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.1.9",
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "11190b7df0746c6b8c9b2122c9b888cf98d5337c7aedc9c836fbc9e20ac69371",
                "md5": "5537be5ce51f80830f4fc20b5679ce7c",
                "sha256": "dd4f5284eeb4a9825412d8da91d80c3c9f155ec7d709120bbedefdbcac7a9809"
            },
            "downloads": -1,
            "filename": "streamlit_jupyter-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5537be5ce51f80830f4fc20b5679ce7c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13034,
            "upload_time": "2023-02-07T16:29:46",
            "upload_time_iso_8601": "2023-02-07T16:29:46.975955Z",
            "url": "https://files.pythonhosted.org/packages/11/19/0b7df0746c6b8c9b2122c9b888cf98d5337c7aedc9c836fbc9e20ac69371/streamlit_jupyter-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99b66d6091977f78b2d9efef8af8246678dce46ca60d8c6d57d8a3447f4501bb",
                "md5": "b8d82cc18bd6d0be08dfb7401f2ae581",
                "sha256": "cfc81577112cdf372068f7ef30b3173155ee0a57cfa533debe9f75ffdfbc3473"
            },
            "downloads": -1,
            "filename": "streamlit-jupyter-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "b8d82cc18bd6d0be08dfb7401f2ae581",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14797,
            "upload_time": "2023-02-07T16:29:48",
            "upload_time_iso_8601": "2023-02-07T16:29:48.940619Z",
            "url": "https://files.pythonhosted.org/packages/99/b6/6d6091977f78b2d9efef8af8246678dce46ca60d8c6d57d8a3447f4501bb/streamlit-jupyter-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 16:29:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ddobrinskiy",
    "github_project": "streamlit-jupyter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "streamlit-jupyter"
}
        
Elapsed time: 0.09155s