DocumentationsearchSearchrocket_launchGet startedInstallationremoveUse command lineUse Anaconda DistributionUse GitHub CodespacesUse SnowflakeFundamentalsaddFirst stepsaddcodeDevelopConceptsaddAPI referenceaddTutorialsaddQuick referenceaddweb_assetDeployConceptsaddStreamlit Community CloudaddStreamlit in Snowflakeopen_in_newOther platformsaddschoolKnowledge baseFAQInstalling dependenciesDeployment issuesHome/Get started/Installation/Use SnowflakeUse Streamlit in Snowflake to code in a secure environment
Snowflake is a single, global platform that powers the Data Cloud. If you want to use a secure platform with role-based access control, this is the option for you! This page walks you through creating a trial Snowflake account and building a simple "Hello world" app. Your trial account comes with an account credit so you can try out the service without entering any payment information.
push_pinNoteStreamlit in Snowflake is currently based on Streamlit version 1.22.0 with some Limitations and unsupported features. We are working on supporting newer versions and more features.
Prerequisites
All you need is an email address! Everything else happens in your 30-day trial account.
Create an account


Go to signup.snowflake.com. (This link will open in a new tab.)


Fill in your information and click "CONTINUE."


Select "Standard" for your Snowflake edition and "Amazon Web Services" for your cloud provider.


Choose the region nearest you, accept the terms, and click "GET STARTED."





Answer or skip a few questions to let us know more about yourself.


A message will display to confirm "You're now signed up!" Go to your email and click on the activation link. (Within your link, note the subdomain. This is your Snowflake account identifier. https://<account_identifier>.snowflakecomputing.com)


Set your username and password. This will be an admin user account within your Snowflake account. Your Snowflake account can have multiple users within it.


If you are not signed in after setting your password, follow the instructions to enter your Snowflake account identifier before entering your username and password. If you've accidentally closed your browser, you can log in at app.snowflake.com.


Congratulations! You have a trial Snowflake account. The first thing you will see are some sample databases. (This interface is called Snowsight. Check out the Snowflake docs for a quick tour.)



Accept the use of Anaconda on your Snowflake account


In the left navigation, go to "Admin" then "Billing & Terms."


In the "Anaconda" section, click "Enable."


Accept the terms. The "Anaconda" section will now show "Acknowledged."


Create a warehouse and database to hold your Streamlit apps


Click on your name in the left navigation. Hover over "Switch Role" and select "ACCOUNTADMIN" to use your account in the context of an admin.


In the left navigation under "Admin," click on "Warehouses."


In the upper-right corner, click the blue "add Warehouse" button.


Enter "STREAMLITWAREHOUSE" for the name and keep the defaults of "Standard" type and "X-Small" size. Click "Create Warehouse."


In the left navigation, go to "Data" then "Databases." (This is back where you started!)


In the upper-right corner, click the blue "add Database" button.


Enter "STREAMLITAPPSDB" for the name. Click "Create."


Yay! You now have a new database to hold all your Streamlit apps.



Create a "Hello World" Streamlit app


In the left navigation, click on "Streamlit."


In the upper-right corner, click the blue "add Streamlit App" button.


Enter "Hello World" for the name of your app. Your new warehouse and database should already be filled in, along with the "PUBLIC" schema for your database. Click "Create." (Note that the app will run with the rights of "ACCOUNTADMIN" for simplicity. You can curate your roles and permissions to choose who can create and access apps.)



Your new app, prefilled with example code, will open in editing mode. The left panel shows your code. The right panel shows the resulting app.


You can explore the example if you want, but we'll proceed here with a simpler example. (Don't worry! You can always make another app to get the same example again.) Delete the code on the left and replace it with:
import streamlit as st

st.write("Hello World")



In the upper-right corner, click the blue "play_arrow Run" button to make the running app reflect your changes.


Hooray! You just wrote a Streamlit app.





Change st.write to st.title:
import streamlit as st

st.title("Hello World")



In the upper-right corner, click the blue "play_arrow Run" button to make the running app reflect your changes.


You've just edited your app. It's that easy.



When you're done, click "chevron_left Streamlit Apps" in the upper-left corner to go back to Snowsight.


Returning to your app


When you are ready to return to your app, go to your Snowsight interface. (If you are returning to the site, you can log in at app.snowflake.com.)


In the left navigation, go to "Streamlit."


Click on "Hello World." (If you don't see your app, check that you have your role set to "ACCOUNTADMIN" as above.)



Your app will open in viewing mode. Just click "Edit" in the upper-right corner to modify your app again.



What's next?
Read about our Basic concepts and try out more commands in your app. To create more apps in your account, you can proceed from Create a "Hello World" Streamlit app. The warehouse and database setup do not need to be repeated.
For more information about creating and managing Streamlit in Snowflake apps, check out the Snowflake docs.Previous: Use GitHub CodespacesNext: FundamentalsforumStill have questions?Our forums are full of helpful information and Streamlit experts.HomeContact UsCommunity© 2024 Snowflake Inc.Cookie policy