-
Notifications
You must be signed in to change notification settings - Fork 546
Playground and get started #1240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
27d66b5
5d653dc
6e5902a
1964d5f
aae3137
374fcce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
--- | ||
title: Install Streamlit | ||
title: Set up your Streamlit development environment | ||
slug: /get-started/installation | ||
--- | ||
|
||
# Install Streamlit | ||
# Set up your Streamlit development environment | ||
|
||
There are multiple ways to set up your development environment and install Streamlit. Read below to | ||
understand these options. Developing locally with Python installed on your own computer is the most | ||
common scenario. | ||
|
||
## Summary for experts | ||
## Summary for experienced developers | ||
|
||
1. Set up your Python development environment. | ||
2. Run: | ||
|
@@ -22,43 +22,65 @@ common scenario. | |
``` | ||
4. Jump to our [Basic concepts](/get-started/fundamentals/main-concepts). | ||
|
||
## Installation steps for the rest of us | ||
|
||
<TileContainer layout="list"> | ||
|
||
<RefCard href="/get-started/installation/command-line" size="half"> | ||
|
||
<h5>Option 1: I'm comfortable with the command line</h5> | ||
|
||
Install Streamlit on your own machine using tools like `venv` and `pip`. | ||
|
||
</RefCard> | ||
|
||
<RefCard href="/get-started/installation/anaconda-distribution" size="half"> | ||
|
||
<h5>Option 2: I prefer a graphical interface</h5> | ||
|
||
Install Streamlit using the Anaconda Distribution graphical user interface. This is also the best | ||
approach if you're on Windows or don't have Python set up. | ||
|
||
</RefCard> | ||
|
||
<RefCard href="/get-started/installation/community-cloud" size="half"> | ||
|
||
<h5>Option 3: I'd rather use a cloud-based environment</h5> | ||
|
||
Use Streamlit Community Cloud with GitHub Codespaces so you don't have to go through the trouble | ||
of installing Python and setting up an environment. | ||
|
||
</RefCard> | ||
|
||
<RefCard href="/get-started/installation/streamlit-in-snowflake" size="half"> | ||
|
||
<h5>Option 4: I need something secure, controlled, and in the cloud</h5> | ||
|
||
Use Streamlit in Snowflake to code your apps in the cloud, right alongside your | ||
data with role-based access controls. | ||
|
||
</RefCard> | ||
|
||
</TileContainer> | ||
## General setup and installation | ||
|
||
### Local development options | ||
|
||
<p></p> | ||
|
||
<InlineCalloutContainer> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're doing heroic work, but I think we need a design pass here. I can take a pass directly in the code and share it with you. Or we can meet and do it live. LMK what you prefer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I love our pair programming sessions and I think that will be faster. I was trying to mostly work within the components I already have, but I also have vague design ideas to go a little further. We can also talk about user journeys here. (Like whether someone might use the playground to walk through Basics or not.) 😁 |
||
<InlineCallout | ||
color="orange-70" | ||
icon="bolt" | ||
bold="Streamlit Playground" | ||
href="/get-started/installation/streamlit-playground" | ||
> | ||
<em>"Let me try it out as fast and easy as possible."</em><br /> | ||
Try out Streamlit in your browser. Visit the Streamlit Playground and start playing with code in seconds. | ||
</InlineCallout> | ||
<InlineCallout | ||
color="indigo-70" | ||
icon="terminal" | ||
bold="Command line" | ||
href="/get-started/installation/command-line" | ||
> | ||
<em>"I'm comfortable with the command line."</em><br /> | ||
Install Streamlit on your own machine using tools like `venv` and `pip`. | ||
</InlineCallout> | ||
<InlineCallout | ||
color="indigo-70" | ||
icon="mouse" | ||
bold="Anaconda Distribution" | ||
href="/get-started/installation/anaconda-distribution" | ||
> | ||
<em>"I prefer a graphical interface."</em><br /> | ||
Install Streamlit using the Anaconda Distribution graphical user interface. This is also the best approach if you're on Windows or | ||
don't have Python set up yet. | ||
</InlineCallout> | ||
</InlineCalloutContainer> | ||
|
||
### Cloud development options | ||
|
||
<p></p> | ||
|
||
<InlineCalloutContainer> | ||
<InlineCallout | ||
color="lightBlue-70" | ||
icon="cloud" | ||
bold="GitHub Codespaces" | ||
href="/get-started/installation/community-cloud" | ||
> | ||
<em>"I want a preconfigured, cloud-based Docker environment."</em><br /> | ||
Use Streamlit Community Cloud with GitHub Codespaces so you don't have to go through the trouble of | ||
installing Python and setting up an environment. | ||
</InlineCallout> | ||
<InlineCallout | ||
color="lightBlue-70" | ||
icon="shield" | ||
bold="Streamlit in Snowflake" | ||
href="/get-started/installation/streamlit-in-snowflake" | ||
> | ||
<em>"I need something secure, controlled, and in the cloud."</em><br /> | ||
Use Streamlit in Snowflake to code your apps in the cloud, right alongside your data with role-based access controls. | ||
</InlineCallout> | ||
</InlineCalloutContainer> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Use Streamlit Playground in your browser | ||
slug: /get-started/installation/streamlit-playground | ||
--- | ||
|
||
# Use Streamlit Playground in your browser | ||
|
||
The fastest way to try out Streamlit is to try out our Playground! Streamlit Playground runs in your browser. Just visit the Playground, and a limited version of Streamlit loads as browser scripts. | ||
|
||
Enjoy the following conveniences: | ||
|
||
- Start playing with code right away, completely in your browser. | ||
- No configuration. | ||
- No command line. | ||
- No application installations in your OS. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should make it clear that the playground doesn't support all Streamlit and Python features. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I call this out in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did the following:
|
||
|
||
<Note> | ||
The Playground is dependendant on your computer's resources because it runs _locally_ in your browser. The setup time can vary depending on your machine and internet connection. Although the Playground has everything you need to get started, to access the full awesomeness of Streamlit, see [Install Streamlit using command line](/get-started/installation/command-line) or [Install Streamlit using Anaconda Distribution](/get-started/installation/anaconda-distribution). | ||
</Note> | ||
|
||
## Prerequisites | ||
|
||
Because the Playground runs Streamlit in your browser, you should visit the Playground from a personal computer, not a mobile device. | ||
|
||
## Go to the Playground | ||
|
||
1. Go to [streamlit.io/playground](https://streamlit.io/playground). | ||
|
||
1. Wait for [`stlite`](https://github.com/whitphx/stlite) — a browser-based version of Streamlit — to load in your browser. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you should mention stlite here. It's just confusing to the user. Instead just say something like: |
||
|
||
This can take as little as a few seconds. However, it may take longer depending on your machine and internet. When Streamlit is done loading, an example app is displayed in the right panel. | ||
|
||
 | ||
|
||
## Create a `Hello World` app | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe tell users to click on different example apps and play with them first? |
||
|
||
1. From the "EXAMPLES" list, select "**Blank**." | ||
|
||
1. On the left, update the contents of the code editor to contain the following code: | ||
|
||
```python | ||
import streamlit as st | ||
|
||
st.title("Hello World") | ||
``` | ||
|
||
A second or two after typing or pasting the code into the editor, the right panel will display the updated app. The code editor saves your edits whenever you pause from typing. Therefore, if you pause between keystrokes as you type a new line of code, you may see an error on the right because Streamlit executed an incomplete line. If this happens, just keep typing to complete the line(s) you are writing. When you pause again at the end of the line, Streamlit reruns the app. | ||
|
||
## What's next? | ||
|
||
Read about our [Basic concepts](/get-started/fundamentals/main-concepts) and try out more commands in your app. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think "what's next" should point people toward installing Streamlit. Maybe something like: What's next?At this point you have two options:
|
||
|
||
When you use the Streamlit Playground to work through the basic concepts, you can skip over any instructions to save your file or to select "**Rerun on save**." Streamlit Playground automatically saves your code when you pause from editing, as described above. Also, it is already configured to rerun on save. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,19 @@ site_menu: | |
url: /get-started | ||
color: orange-70 | ||
icon: rocket_launch | ||
- category: Get started / Installation | ||
- category: Get started / Setup | ||
url: /get-started/installation | ||
- category: Get started / Installation / Use command line | ||
- category: Get started / Setup / LOCAL DEVELOPMENT | ||
- category: Get started / Setup / Use Streamlit Playground ✨ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It uses your machine's local resources, though. It runs in your browser, but uses your own hardware, not a cloud server. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved it up to highlight it separately, which brushes the distinction under the rug. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still feels funny... I think the first thing under the Setup section needs to be how to install locally. Also, I guess the real problem is that it doesn't really feel like the playground belongs in the Setup section. What if we pulled it out of that menu and renamed the menu to Installation?
|
||
url: /get-started/installation/streamlit-playground | ||
- category: Get started / Setup / Install via command line | ||
url: /get-started/installation/command-line | ||
- category: Get started / Installation / Use Anaconda Distribution | ||
- category: Get started / Setup / Install via Anaconda Distribution | ||
url: /get-started/installation/anaconda-distribution | ||
- category: Get started / Installation / Use GitHub Codespaces | ||
- category: Get started / Setup / CLOUD DEVELOPMENT | ||
- category: Get started / Setup / Use GitHub Codespaces | ||
url: /get-started/installation/community-cloud | ||
- category: Get started / Installation / Use Snowflake | ||
- category: Get started / Setup / Use Snowflake | ||
url: /get-started/installation/streamlit-in-snowflake | ||
- category: Get started / Fundamentals | ||
url: /get-started/fundamentals | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think the previous wording made it clearer that if you're an expert you don't have to read the rest of these.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the Playground up to highlight it further and added a little explainer blurb to emphasize to completely new or random passersby that the Playground is the easiet way to get a taste before choosing one of the local or cloud setup options below.