Highlights:
-
SymPy support and ability to draw mathematical expressions using LaTeX! See
st.latex
,st.markdown
, andst.write
. -
You can now set config options using environment variables. For example,
export STREAMLIT_SERVER_PORT=9876
. -
Ability to call
streamlit run
directly with Github and Gist URLs. No
need to grab the โrawโ URL first! -
Cleaner exception stack traces. We now remove all Streamlit-specific code
from stack traces originating from the userโs app.
More info
Math support
WIth this release you can draw mathematical expressions in your Streamlit apps in 3 different ways:
-
You can pass SymPy expressions to
st.write
andst.latex
:a, b, c, x = sympy.symbols('a b c x') st.write(a * x ** 2 + b * x + c)
-
You can pass LaTeX strings to
st.latex
:st.latex('ax^2 + bx + c')
-
You can pass LaTeX strings in
st.write
,st.markdown
, and magic by wrapping them in$
or$$
(to print it large in a new line):st.write(""" This is a polynomial: $x^2$ And so is this: $$ ax^2 + bx + c $$ """)
Environment variables
Streamlit supports all sorts of config options (run streamlit config show
to see all of them), and you can pass them to Streamlit in different ways:
- Via
~/.streamlit/config.toml
- Via
./.streamlit/config.toml
- Via command-line flags, such as in
$ streamlit run --server.port=9876 foo.py
-
And now via environment variables, like this:
$ export STREAMLIT_SERVER_PORT=9876 $ streamlit run foo.py
That is, just add STREAMLIT_
before any config option and turn it to uppercase snake case and itโs a valid environment variable
Many thanks to Streamlit user @kinghuang for the contribution!!!
Github/Gist URLs:
Prior to this release, you could already call streamlit run [some_url]
, but that URL had to resolve to a Python file or it would be an error. Now, with the help of Streamlit user @aritropaul (
) we also support Github and Gist URLs.
Try it out with:
$ streamlit run https://gist.github.com/tvst/713f5804ab45b9430866ee639d8568f1