# wfork-streamlit-profiler 🏄🏼
[![PyPi](https://img.shields.io/pypi/v/wfork-streamlit-profiler)](https://pypi.org/project/wfork-streamlit-profiler/)
**Runtime profiler for Streamlit, powered by [pyinstrument](https://github.com/joerick/pyinstrument).**
*wfork-streamlit-profiler is a fork of streamlit-profiler 0.2.4. If there are any newer versions of the original streamlit-profiler, you should probably use those instead. See the original project's github for more: https://github.com/jrieke/streamlit-profiler*
streamlit-profiler is a [Streamlit component](https://streamlit.io/components) that
helps you find out which parts of your app are slow. It profiles the code via
[pyinstrument](https://github.com/joerick/pyinstrument) and shows the results right
within your Streamlit app.
<sup>Alpha version, use with care.</sup>
---
<h3 align="center">
⏱️ <a href="https://share.streamlit.io/jrieke/streamlit-profiler/main/examples/basic.py">Live demo</a> ⏱️
</h3>
---
<p align="center">
<a href="https://share.streamlit.io/jrieke/streamlit-profiler/main/examples/basic.py"><img src="images/demo.png" width=600></a>
</p>
## Installation
```bash
pip install wfork-streamlit-profiler
```
## Usage
```python
import streamlit as st
from wfork_streamlit_profiler import Profiler
with Profiler():
st.title("My app")
# ... other code
# Or:
# p = Profiler()
# p.start()
# ...
# p.stop()
```
Then start your app as usual: `streamlit run my_app.py`
The `Profiler` class is an extension of `pyinstrument.Profiler`, so you can use
[all of its functions](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.Profiler).
Raw data
{
"_id": null,
"home_page": "https://github.com/wyattscarpenter/streamlit-profiler",
"name": "wfork-streamlit-profiler",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Johannes Rieke",
"author_email": "johannes.rieke@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6a/2c/e1718c0b6ca9052daa15b6880a901e3551ce64d35b3843e5b306cd2892d4/wfork_streamlit_profiler-0.2.7.tar.gz",
"platform": null,
"description": "# wfork-streamlit-profiler \ud83c\udfc4\ud83c\udffc\n\n[![PyPi](https://img.shields.io/pypi/v/wfork-streamlit-profiler)](https://pypi.org/project/wfork-streamlit-profiler/)\n\n**Runtime profiler for Streamlit, powered by [pyinstrument](https://github.com/joerick/pyinstrument).**\n\n*wfork-streamlit-profiler is a fork of streamlit-profiler 0.2.4. If there are any newer versions of the original streamlit-profiler, you should probably use those instead. See the original project's github for more: https://github.com/jrieke/streamlit-profiler*\n\nstreamlit-profiler is a [Streamlit component](https://streamlit.io/components) that\nhelps you find out which parts of your app are slow. It profiles the code via\n[pyinstrument](https://github.com/joerick/pyinstrument) and shows the results right\nwithin your Streamlit app.\n\n<sup>Alpha version, use with care.</sup>\n\n---\n\n<h3 align=\"center\">\n \u23f1\ufe0f <a href=\"https://share.streamlit.io/jrieke/streamlit-profiler/main/examples/basic.py\">Live demo</a> \u23f1\ufe0f\n</h3>\n\n---\n\n<p align=\"center\">\n <a href=\"https://share.streamlit.io/jrieke/streamlit-profiler/main/examples/basic.py\"><img src=\"images/demo.png\" width=600></a>\n</p>\n\n## Installation\n\n```bash\npip install wfork-streamlit-profiler\n```\n\n## Usage\n\n```python\nimport streamlit as st\nfrom wfork_streamlit_profiler import Profiler\n\nwith Profiler():\n st.title(\"My app\")\n # ... other code\n\n# Or:\n# p = Profiler()\n# p.start()\n# ...\n# p.stop()\n```\n\nThen start your app as usual: `streamlit run my_app.py`\n\nThe `Profiler` class is an extension of `pyinstrument.Profiler`, so you can use\n[all of its functions](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.Profiler).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "(fork of) Runtime profiler for Streamlit, powered by pyinstrument",
"version": "0.2.7",
"project_urls": {
"Homepage": "https://github.com/wyattscarpenter/streamlit-profiler"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "56839dabd7d3d2029f6125b8f2553aea4bb7bc2589393cd854f608c978059e67",
"md5": "2b6a87c3d50c4534680ee843e1991bff",
"sha256": "e93882b0f5b1253f28e09a8b4dfee390a8c3f24bb5e28b882faa32989a5b6d84"
},
"downloads": -1,
"filename": "wfork_streamlit_profiler-0.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b6a87c3d50c4534680ee843e1991bff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 4127,
"upload_time": "2024-08-11T16:26:46",
"upload_time_iso_8601": "2024-08-11T16:26:46.065648Z",
"url": "https://files.pythonhosted.org/packages/56/83/9dabd7d3d2029f6125b8f2553aea4bb7bc2589393cd854f608c978059e67/wfork_streamlit_profiler-0.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6a2ce1718c0b6ca9052daa15b6880a901e3551ce64d35b3843e5b306cd2892d4",
"md5": "f35d8bc5dda200374f431c7b967cf65e",
"sha256": "95b13de893b687d55adf1ac7cf7117de2fada9a2aa1e46683963511c178bc069"
},
"downloads": -1,
"filename": "wfork_streamlit_profiler-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "f35d8bc5dda200374f431c7b967cf65e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 3503,
"upload_time": "2024-08-11T16:26:47",
"upload_time_iso_8601": "2024-08-11T16:26:47.338921Z",
"url": "https://files.pythonhosted.org/packages/6a/2c/e1718c0b6ca9052daa15b6880a901e3551ce64d35b3843e5b306cd2892d4/wfork_streamlit_profiler-0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-11 16:26:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wyattscarpenter",
"github_project": "streamlit-profiler",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "wfork-streamlit-profiler"
}