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.

Metadata

Release files for wfork-streamlit-profiler 1.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wfork-streamlit-profiler 1.7.1
File Size Uploaded
wfork_streamlit_profiler-1.7.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wfork-streamlit-profiler 1.7.1
File Interpreter ABI Platform
wfork_streamlit_profiler-1.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / wfork_streamlit_profiler-1.7.1.tar.gz

Download URL wfork_streamlit_profiler-1.7.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7cd9ff5ece4a21f5cbb73d2508e17c2a4a5adce09eb9fa5bdd2edac5f128fad6
BLAKE2b-256 checksum
How to use checksums
20915c6b183da54bc1d7ca267d7ccc3e81391b9ff367a1d01faae8a97f37e36b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / wfork_streamlit_profiler-1.7.1-py3-none-any.whl

Download URL wfork_streamlit_profiler-1.7.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f68e0b155f75f5bc48e5d5ae9b6820a6cad19f364ec5f2e9b2c73329b03eb41
BLAKE2b-256 checksum
How to use checksums
15bb3b12e793ac1c288420f1ef7a6eb4a7bf0f574356a69a2ac8b314ef6931e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page