diff --git a/content/develop/api-reference/_index.md b/content/develop/api-reference/_index.md index 46c8a112e..edea59a75 100644 --- a/content/develop/api-reference/_index.md +++ b/content/develop/api-reference/_index.md @@ -116,6 +116,19 @@ Display text in subheader formatting. st.subheader("This is a subheader") ``` + + + +screenshot + +

Badge

+ +Display a small, colored badge. + +```python +st.badge("New") +``` +
diff --git a/content/develop/api-reference/caching-and-state/context.md b/content/develop/api-reference/caching-and-state/context.md index c1514d754..4cd96eafb 100644 --- a/content/develop/api-reference/caching-and-state/context.md +++ b/content/develop/api-reference/caching-and-state/context.md @@ -10,6 +10,8 @@ description: st.context displays a read-only dict of cookies and headers + + diff --git a/content/develop/api-reference/command-line/_index.md b/content/develop/api-reference/command-line/_index.md index aeab54042..44f89f8f5 100644 --- a/content/develop/api-reference/command-line/_index.md +++ b/content/develop/api-reference/command-line/_index.md @@ -9,60 +9,23 @@ When you install Streamlit, a command-line (CLI) tool gets installed as well. The purpose of this tool is to run Streamlit apps, change Streamlit configuration options, and help you diagnose and fix issues. -To see all of the supported commands: +## Available commands -```bash -streamlit --help -``` - -### Run Streamlit apps - -```bash -streamlit run your_script.py [-- script args] -``` - -Runs your app. At any time you can stop the server with **Ctrl+c**. +- [`streamlit cache clear`](/develop/api-reference/cli/cache): Clear the on-disk cache. +- [`streamlit config show`](/develop/api-reference/cli/config): Show all configuration options. +- [`streamlit docs`](/develop/api-reference/cli/docs): Open the Streamlit docs. +- [`streamlit hello`](/develop/api-reference/cli/hello): Run an example Streamlit app. +- [`streamlit help`](/develop/api-reference/cli/help): Show the available CLI commands. +- [`streamlit init`](/develop/api-reference/cli/init): Create the files for a new Streamlit app. +- [`streamlit run`](/develop/api-reference/cli/run): Run your Streamlit app. +- [`streamlit version`](/develop/api-reference/cli/version): Show the version of Streamlit. - +### Run your app -When passing your script some custom arguments, **they must be passed after -two dashes**. Otherwise the arguments get interpreted as arguments to Streamlit -itself. - - - -To see the Streamlit 'Hello, World!' example app, run `streamlit hello`. - -### View Streamlit version - -To see what version of Streamlit is installed, just type: +The most important command is `streamlit run`, which is summarized for convenience here: ```bash -streamlit version +streamlit run your_script.py ``` -### View documentation - -```bash -streamlit docs -``` - -Opens the Streamlit documentation (i.e. this website) in a web browser. - -### Clear cache - -```bash -streamlit cache clear -``` - -Clears persisted files from the on-disk [Streamlit cache](/develop/api-reference/caching-and-state), if -present. - -### View all configuration options - -As described in [Configuration](/develop/concepts/configuration), Streamlit has several -configuration options. To view them all, including their current values, just type: - -```bash -streamlit config show -``` +At any time, in your terminal, you can stop the server with **Ctrl+C**. diff --git a/content/develop/api-reference/command-line/cache.md b/content/develop/api-reference/command-line/cache.md new file mode 100644 index 000000000..e0e33d3a7 --- /dev/null +++ b/content/develop/api-reference/command-line/cache.md @@ -0,0 +1,14 @@ +--- +title: streamlit cache +slug: /develop/api-reference/cli/cache +--- + +## `$ streamlit cache clear` + +Clear persisted files from the on-disk [Streamlit cache](/develop/api-reference/caching-and-state), if present. + +### Syntax + +``` +streamlit cache clear +``` diff --git a/content/develop/api-reference/command-line/config.md b/content/develop/api-reference/command-line/config.md new file mode 100644 index 000000000..12e68afe3 --- /dev/null +++ b/content/develop/api-reference/command-line/config.md @@ -0,0 +1,14 @@ +--- +title: streamlit config show +slug: /develop/api-reference/cli/config +--- + +## `$ streamlit config show` + +Print all the available configuration options, including their descriptions, default values, and current values. For more information about configuration options, see [`config.toml`](/develop/api-reference/configuration/config.toml). + +### Syntax + +``` +streamlit config show +``` diff --git a/content/develop/api-reference/command-line/docs.md b/content/develop/api-reference/command-line/docs.md new file mode 100644 index 000000000..3a54a519f --- /dev/null +++ b/content/develop/api-reference/command-line/docs.md @@ -0,0 +1,14 @@ +--- +title: streamlit docs +slug: /develop/api-reference/cli/docs +--- + +## `$ streamlit docs` + +Open the Streamlit docs in your default browser. + +### Syntax + +``` +streamlit docs +``` diff --git a/content/develop/api-reference/command-line/hello.md b/content/develop/api-reference/command-line/hello.md new file mode 100644 index 000000000..a260aa47e --- /dev/null +++ b/content/develop/api-reference/command-line/hello.md @@ -0,0 +1,44 @@ +--- +title: streamlit hello +slug: /develop/api-reference/cli/hello +--- + +## `$ streamlit hello` + +Run the Hello app, an example Streamlit app included with the Streamlit library. + +### Syntax + +``` +streamlit hello +``` + +### Options + +The `hello` command accepts configuration options (just like the `run` command does). Configuration options are passed in the form of `--
.