Skip to main content

wfork-streamlit-profiler  🏄🏼

PyPi GitHub latest tag

Runtime profiler for Streamlit, powered by 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 that helps you find out which parts of your app are slow. It profiles the code via pyinstrument and shows the results right within your Streamlit app.


⏱️ Live demo ⏱️


Installation

pip install wfork-streamlit-profiler

Usage

import streamlit as st
from wfork_streamlit_profiler import Profiler

with Profiler():
    st.title("My app")
    # ... other code

Or:

import streamlit as st
from wfork_streamlit_profiler import Profiler

p = Profiler()
p.start()
# ... other code
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.

Don't want the profiler to immediately display when you stop profiling? Initialize it with Profiler(auto_output_on_stop=False) instead, and call the .output_streamlit() method whenever you want it to display, instead. You can also set the async_mode of the profiler in the pyinstrument in the same constructor, whatever that means.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wfork_streamlit_profiler-1.7.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wfork_streamlit_profiler-1.7.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file wfork_streamlit_profiler-1.7.0.tar.gz.

File metadata

File hashes

Hashes for wfork_streamlit_profiler-1.7.0.tar.gz
Algorithm Hash digest
SHA256 17d2d4b1dddc44b3195581b989a60b1942f6b32b1e726e5ee0850420add295d9
MD5 25b2219c78b2747174df04e9d57837b8
BLAKE2b-256 2960b6a37face28cceceeace4e4d4a7fcf2baadf30ad06c27a81da6db634969c

See more details on using hashes here.

File details

Details for the file wfork_streamlit_profiler-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wfork_streamlit_profiler-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 023b55ce6c5b32da967d21e2971b96afad1dbc74ab217d3a20a038be01e6d76b
MD5 762bb07d8486b837656d2b1b2fb934c6
BLAKE2b-256 7787bad0208b047a4a1884076b12d9106ae3429bc747ab2e7e4a1e503bbc5bdd

See more details on using hashes here.

Release history Release notifications | RSS feed

1.7.1

2 files

This release

1.7.0 This release

2 files

1.6.0

2 files

1.5.0

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page