Skip to main content

Runtime profiler for Streamlit, powered by pyinstrument

Project description

streamlit-profiler  🏄🏼

PyPi

Runtime profiler for Streamlit, powered by pyinstrument.

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.

Alpha version, use with care.


⏱️ Live demo ⏱️


Installation

pip install streamlit-profiler

Usage

import streamlit as st
from 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.

Project details


Download files

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

Source Distribution

streamlit-profiler-0.2.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

streamlit_profiler-0.2.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-profiler-0.2.4.tar.gz.

File metadata

  • Download URL: streamlit-profiler-0.2.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.5 Darwin/20.5.0

File hashes

Hashes for streamlit-profiler-0.2.4.tar.gz
Algorithm Hash digest
SHA256 0d87494abdbd9d8372fc004360e06e18dfce316432853d210334026bf616cd2b
MD5 8dd40742d51a2c8da13333c32559ab5d
BLAKE2b-256 f4ec23e0cc71902cae6373fcbf76d76bbae423908b53279aa2fc2e9c01ddbef7

See more details on using hashes here.

File details

Details for the file streamlit_profiler-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_profiler-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66b0a95da4bd2377ee1c7c9020f5b535bb03cd77ffe801b341dfaa2490676506
MD5 ffc9c50833b219858184825d0a28b7ef
BLAKE2b-256 f49a56378a39d060b2ac883e947c23aaa8688ad7991636151e68ec08b264a37e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page