How do I run my Streamlit script?

Working with Streamlit is simple. First you sprinkle a few Streamlit commands into a normal Python script, and then you run it. We list few ways to run your script, depending on your use case.

Once you've created your script, say, the easiest way to run it is with streamlit run:

streamlit run

As soon as you run the script as shown above, a local Streamlit server will spin up and your app will open in a new tab in your default web browser.

When passing your script some custom arguments, they must be passed after two dashes. Otherwise the arguments get interpreted as arguments to Streamlit itself:

streamlit run [-- script args]

You can also pass a URL to streamlit run! This is great when your script is hosted remotely, such as a GitHub Gist. For example:

streamlit run

Another way of running Streamlit is to run it as a Python module. This is useful when configuring an IDE like PyCharm to work with Streamlit:

# Running
python -m streamlit run
# is equivalent to:
streamlit run

Still have questions?

Our forums are full of helpful information and Streamlit experts.

Was this page helpful?

editEdit this page on GitHub