stqdm


Namestqdm JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/Wirg/stqdm
SummaryEasy progress bar for streamlit based on the awesome streamlit.progress and tqdm
upload_time2023-01-05 08:58:51
maintainerWirg
docs_urlNone
authorWirg
requires_python>=3.7.2,<4.0.0
licenseApache-2.0
keywords streamlit progressbar progressmeter progress bar meter rate eta tqdm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stqdm
![Tests](https://github.com/Wirg/stqdm/workflows/Tests/badge.svg)
[![codecov](https://codecov.io/gh/Wirg/stqdm/branch/main/graph/badge.svg?token=YeHnzpfMty)](https://codecov.io/gh/Wirg/stqdm)
[![CodeQL](https://github.com/Wirg/stqdm/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/Wirg/stqdm/actions/workflows/codeql-analysis.yml)

stqdm is the simplest way to handle a progress bar in streamlit app.

![demo gif](https://raw.githubusercontent.com/Wirg/stqdm/main/assets/demo.gif)

## How to install

```sh
pip install stqdm
```

## How to use

You can find some examples in `examples/`

### Use stqdm in main
```python
from time import sleep
from stqdm import stqdm

for _ in stqdm(range(50)):
    sleep(0.5)
```

### Use stqdm in sidebar
```python
from time import sleep
import streamlit as st
from stqdm import stqdm

for _ in stqdm(range(50), st_container=st.sidebar):
    sleep(0.5)
```

### Customize the bar with tqdm parameters

![demo gif](https://raw.githubusercontent.com/Wirg/stqdm/main/assets/demo_with_custom_params.gif)

```python
from time import sleep
from stqdm import stqdm

for _ in stqdm(range(50), desc="This is a slow task", mininterval=1):
    sleep(0.5)
```

### Display a progress bar during pandas Dataframe & Series operations
STqdm inherits from tqdm, you can call stqdm.pandas() in a similar way. See [tqdm docs](https://github.com/tqdm/tqdm#pandas-integration).
```python
from time import sleep

import pandas as pd
from stqdm import stqdm

stqdm.pandas()

pd.Series(range(50)).progress_map(lambda x: sleep(1))
pd.Dataframe({"a": range(50)}).progress_apply(lambda x: sleep(1), axis=1)
```

### Display the progress bar only in the frontend or the backend

```python
from time import sleep

from stqdm import stqdm

# Default to frontend only
for i in stqdm(range(50), backend=False, frontend=True):
    sleep(0.5)


for i in stqdm(range(50), backend=True, frontend=False):
    sleep(0.5)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Wirg/stqdm",
    "name": "stqdm",
    "maintainer": "Wirg",
    "docs_url": null,
    "requires_python": ">=3.7.2,<4.0.0",
    "maintainer_email": "Wirg@users.noreply.github.com",
    "keywords": "streamlit,progressbar,progressmeter,progress,bar,meter,rate,eta,tqdm",
    "author": "Wirg",
    "author_email": "Wirg@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/f4/770b463dd67fb3bd0204bd3d35423c838e58a5f78f97bf98730b9b1cb991/stqdm-0.0.5.tar.gz",
    "platform": null,
    "description": "# stqdm\n![Tests](https://github.com/Wirg/stqdm/workflows/Tests/badge.svg)\n[![codecov](https://codecov.io/gh/Wirg/stqdm/branch/main/graph/badge.svg?token=YeHnzpfMty)](https://codecov.io/gh/Wirg/stqdm)\n[![CodeQL](https://github.com/Wirg/stqdm/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/Wirg/stqdm/actions/workflows/codeql-analysis.yml)\n\nstqdm is the simplest way to handle a progress bar in streamlit app.\n\n![demo gif](https://raw.githubusercontent.com/Wirg/stqdm/main/assets/demo.gif)\n\n## How to install\n\n```sh\npip install stqdm\n```\n\n## How to use\n\nYou can find some examples in `examples/`\n\n### Use stqdm in main\n```python\nfrom time import sleep\nfrom stqdm import stqdm\n\nfor _ in stqdm(range(50)):\n    sleep(0.5)\n```\n\n### Use stqdm in sidebar\n```python\nfrom time import sleep\nimport streamlit as st\nfrom stqdm import stqdm\n\nfor _ in stqdm(range(50), st_container=st.sidebar):\n    sleep(0.5)\n```\n\n### Customize the bar with tqdm parameters\n\n![demo gif](https://raw.githubusercontent.com/Wirg/stqdm/main/assets/demo_with_custom_params.gif)\n\n```python\nfrom time import sleep\nfrom stqdm import stqdm\n\nfor _ in stqdm(range(50), desc=\"This is a slow task\", mininterval=1):\n    sleep(0.5)\n```\n\n### Display a progress bar during pandas Dataframe & Series operations\nSTqdm inherits from tqdm, you can call stqdm.pandas() in a similar way. See [tqdm docs](https://github.com/tqdm/tqdm#pandas-integration).\n```python\nfrom time import sleep\n\nimport pandas as pd\nfrom stqdm import stqdm\n\nstqdm.pandas()\n\npd.Series(range(50)).progress_map(lambda x: sleep(1))\npd.Dataframe({\"a\": range(50)}).progress_apply(lambda x: sleep(1), axis=1)\n```\n\n### Display the progress bar only in the frontend or the backend\n\n```python\nfrom time import sleep\n\nfrom stqdm import stqdm\n\n# Default to frontend only\nfor i in stqdm(range(50), backend=False, frontend=True):\n    sleep(0.5)\n\n\nfor i in stqdm(range(50), backend=True, frontend=False):\n    sleep(0.5)\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Easy progress bar for streamlit based on the awesome streamlit.progress and tqdm",
    "version": "0.0.5",
    "split_keywords": [
        "streamlit",
        "progressbar",
        "progressmeter",
        "progress",
        "bar",
        "meter",
        "rate",
        "eta",
        "tqdm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08e363cf2a221dc4c5894c2e42a7916ddcde8e5846f9551c2e9ed83024934fa3",
                "md5": "48d5104823c064fb5d4c57e3e0b7246c",
                "sha256": "3177858c1ce5244821f13cc7cbd88a6dc8f154ef1bd12d2fa3342f2a9caf8843"
            },
            "downloads": -1,
            "filename": "stqdm-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48d5104823c064fb5d4c57e3e0b7246c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.2,<4.0.0",
            "size": 11123,
            "upload_time": "2023-01-05T08:58:49",
            "upload_time_iso_8601": "2023-01-05T08:58:49.878316Z",
            "url": "https://files.pythonhosted.org/packages/08/e3/63cf2a221dc4c5894c2e42a7916ddcde8e5846f9551c2e9ed83024934fa3/stqdm-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bf4770b463dd67fb3bd0204bd3d35423c838e58a5f78f97bf98730b9b1cb991",
                "md5": "25ffbbda9e698d3fe36d43c04c3c500c",
                "sha256": "1bed78e60068da3afc7c6d87a5388006036633aa2fe2e19fa7db46483ef1227e"
            },
            "downloads": -1,
            "filename": "stqdm-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "25ffbbda9e698d3fe36d43c04c3c500c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.2,<4.0.0",
            "size": 7406,
            "upload_time": "2023-01-05T08:58:51",
            "upload_time_iso_8601": "2023-01-05T08:58:51.097481Z",
            "url": "https://files.pythonhosted.org/packages/6b/f4/770b463dd67fb3bd0204bd3d35423c838e58a5f78f97bf98730b9b1cb991/stqdm-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-05 08:58:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Wirg",
    "github_project": "stqdm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stqdm"
}
        
Elapsed time: 0.03066s