Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front‑end experience required.
- In this GitHub repo, click on "Use this Template" (the green button at the top of this page)
- Name the repo streamlit-app
- In your GitHub-Account, click on the green Code button and select Open with GitHub Desktop to copy the streamlit-app repository to your local machine.
In your terminal (Mac) or Anaconda Command Prompt (Windows):
- Step 1:
cdinto the streamlit-app folder (replace YOURPATH with your path to the folder streamlit-app)
cd YOURPATH/streamlit-app- Step 2: install all needed Python libraries from the environment.yml file to create a virtual environment named env-streamlit.yml:
conda env create -f env-streamlit.yml- Step 3: Activate the streamlit environment:
conda activate streamlit- Step 4: Change current directory (cd) into 1-first-app
cd 1-first-app- Step 5: Start the app:
streamlit run app.py- If asked for your e-mail, you can simply press enter (you don't need to provide this information)
-
Step 6: The command should open your browser and display the app.
-
If your browser opened but only displays a blank screen (this may happen if you use Safari), copy the url and paste it in another browser (e.g., Chrome).
- Step 7: Start Visual Studio Code and click on
Open Folderin the Explorer. Select thestreamlit-appfolder.
-
Step 8: In the VS Code Explorer, select
1-first-appand open the fileapp.py(this is the code of the app) -
While developing a Streamlit app, it's recommended to lay out your VS code editor and browser windows side by side, so the code and the app can be seen at the same time.
- Step 9: VS Code: In the code of app.py, change
st.title("My first App")tost.title("Hello World!")and save the changes.
- Step 10: Refresh your browser to display the changes.
- Step 11: If you are done, close the browser window, go to your terminal and stop your app with
Ctrl+C(or simply close the terminal window).
-
Get familiar with the main concepts
- App demo:
streamlit helloA Streamlit demo to interactively visualize Uber pickups in New York City:
