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.1.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.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for wfork_streamlit_profiler-1.7.1.tar.gz
Algorithm Hash digest
SHA256 7cd9ff5ece4a21f5cbb73d2508e17c2a4a5adce09eb9fa5bdd2edac5f128fad6
MD5 9a6d5ff94b6c50050788e6ebac551bfe
BLAKE2b-256 20915c6b183da54bc1d7ca267d7ccc3e81391b9ff367a1d01faae8a97f37e36b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wfork_streamlit_profiler-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f68e0b155f75f5bc48e5d5ae9b6820a6cad19f364ec5f2e9b2c73329b03eb41
MD5 00b06dae50a3c35c727276a58813b115
BLAKE2b-256 15bb3b12e793ac1c288420f1ef7a6eb4a7bf0f574356a69a2ac8b314ef6931e9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 files

1.7.0

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