skillfed

streamlit-autorefresh

Simple way to autorefresh your Streamlit apps

streamlit-autorefresh v1.0.1 764.4K downloads/30d#5,123 on PyPI222
License unclear Abandoned released

What it is and what it does

Streamlit Autorefresh is a custom Streamlit component that places a timer in the browser frontend to periodically trigger app reruns on a fixed interval. Instead of using an infinite loop in your script (which blocks the server and complicates shutdown), you call st_autorefresh() once with an interval in milliseconds and an optional refresh limit, and the browser handles the timing. The function returns a counter tracking how many times the refresh has fired, letting you conditionally execute different logic at different refresh counts.

The component is designed for dashboards and real-time stats applications where you want regular updates without tying up server resources. You can optionally debounce refreshes when users interact with the app, and you should use a unique key to maintain state across reruns. The trade-off is that it shifts timing work to the browser and relies on frontend timers, which are not perfectly precise.

Use it for:

  • Building a live dashboard that updates metrics or stats at regular intervals without blocking the Streamlit server.
  • Displaying real-time data feeds or sensor readings at regular intervals in a web app.
  • Creating a monitoring application that polls for status changes without an infinite loop in the script.
  • Refreshing a Streamlit app at a fixed cadence while allowing users to interact with controls between refreshes.
  • Limiting the total number of refreshes to prevent unbounded resource consumption in long-running apps.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds a frontend timer to Streamlit apps that triggers periodic script reruns without blocking the server or requiring an infinite loop.

No—the package is abandoned (last release 2023-06-25, no commits since). While it has low install friction and no known vulnerabilities, the lack of maintenance means it may break with future Streamlit versions, and the unclear license creates legal ambiguity. For new projects, consider native Streamlit refresh patterns or actively maintained alternatives.

Install

streamlit-autorefresh on PyPI

pip

pip install streamlit-autorefresh

uv

uv add streamlit-autorefresh

poetry

poetry add streamlit-autorefresh

Installing streamlit-autorefresh

Before you install

Low friction install with a single runtime dependency on streamlit. However, the package is abandoned—last release was 2023-06-25 with no commits since. No active maintenance or updates.

License in practice

License status is unclear; the package declares no SPDX license identifier. Before relying on this package in production or proprietary work, verify the actual license terms in the repository.

Quickstart

pip install streamlit-autorefresh

import streamlit as st
from streamlit_autorefresh import st_autorefresh

count = st_autorefresh(interval=2000, limit=100, key="mykey")
st.write(f"Refresh count: {count}")

Requires streamlit to be installed and running; the component runs on the frontend and relies on browser timers, which are not perfectly precise.

Verify before relying

  • Whether the package works reliably with current Streamlit versions post-2023-06-25.
  • Actual license terms, since the package declares no SPDX identifier.
  • Whether the frontend timer remains accurate under heavy server load or network latency.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — streamlit
Maintenance abandoned — 1,146 days since the last release
Last repo commit
First released
Downloads 764,368/month — #5,123 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: streamlit_autorefresh-1.0.1-py3-none-any.whl

Tags

streamlit auto refresh componentperiodic streamlit app rerunstreamlit dashboard refresh timerstreamlit realtime stats updatestreamlit interval-based refreshstreamlit frontend timerstreamlit refresh without loop
streamlit-componentdashboardabandoned

More Dynamic Content packages