目录
jose-mindwayai

Make Default Sidebar Width Configurable (#12154)

Describe your changes

  1. Extended the initial_sidebar_state in st.set_page_config() parameter to accept an integer value for setting initial sidebar width in pixels.

The initial_sidebar_state parameter in st.set_page_config() now accepts:

  • “auto” (default) - Auto-sizing behavior
  • “expanded” - Sidebar expanded on load
  • “collapsed” - Sidebar collapsed on load
  • int - Set initial sidebar width in pixels and uses the “auto” behaviour
  1. Changed the default sidebar width from 256px to 300px

Ability to Set Default Sidebar Width #11980

Testing Plan

I did some manual testing and added Unit Tests for the sidebar width validation.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.


Co-authored-by: Laura Wilby laura.wilby@snowflake.com

2个月前8638次提交
目录README.md

Streamlit logo

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.

Streamlit Hello

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

Little example

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:

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](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](URL_TO_YOUR_APP)
    Streamlit App

Contribute

🎉 Thanks for your interest in helping improve Streamlit! 🎉

Before contributing, please read our guidelines here: https://github.com/streamlit/streamlit/wiki/Contributing

License

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

关于

一个快速构建和分享数据应用的Python库。

1.2 GB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号