streamlit

streamlit / streamlit

Streamlit 是一个 Python 开源框架,让开发者用纯 Python 快速构建和分享数据应用,无需前端知识。

Python 数据科学 Web 开发 LLM 应用 数据应用 交互式可视化 快速开发 Web 框架

为什么值得看

编辑点评

Streamlit 是目前最流行的数据应用快速开发工具之一,特别适合数据科学家和算法工程师快速把模型、数据分析结果变成可交互的 Web 应用。它最大的优点是代码量极少、上手快,内置组件丰富,修改代码即可热更新。缺点是复杂自定义交互和精细样式控制较弱,适合原型验证、内部工具、LLM Demo 等场景,不适合大型复杂前端项目。

Star 趋势

近 7 日
  • Star 总数46,306
  • 今日新增+7
  • 7 日增速+75%
  • Fork4,453

同类项目

同场景 · 数据科学 / Web 开发 / LLM 应用

项目文档

来自 GitHub README · develop 分支

Welcome to Streamlit 👋

A faster way to build and share data apps.

What is Streamlit?

Streamlit lets you transform Python scripts into interactive web apps in minutes, instead of weeks. Build dashboards, generate reports, or create chat apps. Once you’ve created an app, you can use our Community Cloud platform to deploy, manage, and share your app.

Why choose Streamlit?

  • Simple and Pythonic: Write beautiful, easy-to-read code.
  • Fast, interactive prototyping: Let others interact with your data and provide feedback quickly.
  • Live editing: See your app update instantly as you edit your script.
  • Open-source and free: Join a vibrant community and contribute to Streamlit's future.

Installation

Open a terminal and run:

$ pip install streamlit
$ streamlit hello

If this opens our sweet Streamlit Hello app in your browser, you're all set! If not, head over to our docs for specific installs.

The app features a bunch of examples of what you can do with Streamlit. Jump to the quickstart section to understand how that all works.

Quickstart

A little example

Create a new file named streamlit_app.py in your project directory with the following code:

import streamlit as st

x = st.slider("Select a value")
st.write(x, "squared is", x * x)

Now run it to open the app!

$ streamlit run streamlit_app.py

Give me more!

Streamlit comes in with a ton of additional powerful elements to spice up your data apps and delight your viewers. Some examples:

Input widgets Dataframes Charts Layout Multi-page apps Fun

Our vibrant creators community also extends Streamlit capabilities using  🧩 Streamlit Components.

Get inspired

There's so much you can build with Streamlit: - 🤖  LLMs & chatbot apps - 🧬  Science & technology apps - 💬  NLP & language apps - 🏦  Finance & business apps - 🗺  Geography & society apps - and more!

Check out our gallery! 🎈

Community Cloud

Deploy, manage and share your apps for free using our Community Cloud! Sign-up here.

Resources

  • Explore our docs to learn how Streamlit works.
  • Ask questions and get help in our community forum.
  • Read our blog for tips from developers and creators.
  • Extend Streamlit's capabilities by installing or creating your own Streamlit Components.
  • Help others find and play with your app by using the Streamlit GitHub badge in your repository:
Streamlit App

Streamlit App

Contribute

🎉 Thanks for your interest in helping improve Streamlit! 🎉

We have paused accepting pull requests from outside the Streamlit maintainer team. You can still make a valuable contribution by reporting bugs, requesting features, improving or upvoting existing issues, commenting on open specs, creating custom components, and contributing to streamlit-extras.

Read our contribution guide for details.

License

Streamlit is completely free and open-source and licensed under the Apache 2.0 license.

文档抓取自 GitHub 仓库 README,版权归原作者所有;已过滤徽章等噪音并经安全消毒后展示。