GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • rocket_launchGet started
  • Installation
  • Fundamentals
  • First steps
  • codeDevelop
  • Concepts
  • API reference
  • Write and magic
  • st.write
  • st.write_stream
  • magic
  • Text elements
  • Data elements

This view

  • Original page
  • New address

GeezerVison is showing docs.streamlit.io — st.write and magic commands - Streamlit Docs

st.write and magic commands

Streamlit has two easy ways to display information into your app, which should typically be the first thing you try: st.write and magic.

st.write

Write arguments to the app.

Python
st.write("Hello **world**!")
st.write(my_data_frame)
st.write(my_mpl_figure)

st.write_stream

Write generators or streams to the app with a typewriter effect.

Python
st.write_stream(my_generator)
st.write_stream(my_llm_stream)

Magic

Any time Streamlit sees either a variable or literal value on its own line, it automatically writes that to your app using st.write

Python
"Hello **world**!"
my_data_frame
my_mpl_figure
arrow_backPrevious: API referencearrow_forwardNext: st.write
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.