How are YOU using Streamlit in Education? (poll results!)

Hey all! :wave:

Most of you participated in our google form questionnaire which asked this. I thought you might want to see the results from this question! :ballot_box:

As you can see there are lots of interesting use cases for Streamlit in the classroom!

Please, add your comments, or share your interesting use cases and examples here with your fellow Educators! :nerd_face: :woman_teacher:

Happy Streamlit-ing!


As a grading tool seems like a really interesting use case.

as a grading tool

That may be me :laughing:, I wanted to use Streamlit to replace nbgrader, where students would see the questions in the running Streamlit app one by one, write code in prewritten empty functions (like def add(a,b): ...) and if the code passes a unit test linked to that function (assert test_add(1,2) == 3) then the Streamlit app would pop balloons to congratulate, add some supplementary advice in expanders to go into more details and jump to the next question. A little bit like CodinGame.
And then on my side I would just have a Streamlit dashboard running all pytests on student assignments and give me a dashboard with all the grades!

But I have not arrived to a satisfactory result :frowning: it looks too convoluted for now and need more motivation to dive back into it. There it is if some want to play with it : GitHub - andfanilo/pyspark-streamlit-tutorial.

Hope to hear some other ideas :slight_smile:


Oh @andfanilo,

That looks very cool and I love those ideas. When I was talking with one of the educators on a one-on-one, they were looking for something to auto-convert published notebooks (I think it was colab) into a Streamlit app. That way students could easily see the output nicely but also run, rerun or edit the code in a nicer way.

Do you have any of those apps from your repo on the cloud platform?

I’ve thought about something like this as well @andfanilo, but was thinking of it as a factored-out example using Fast API. Basically, have FastAPI running in the background, users submit the value to an endpoint and then get a success/fail message.

Perhaps a hackathon project :thinking:

1 Like

Ok here’s a prototype in 30 minutes of what I ultimately would love to build long term:


I would store students answers in some config file instead of session state, and at the end extract their answers and run them on my side to have an automatic grade. Or as you say Randy send the answers to some REST endpoint, why not, and saving the answers to the REST endpoint rather than locally to see their progress that’s a nice thought.

Ultimately I still have problems with streamlit-ace and Python exec with multiple statements, no Python linting or code interpolation so I’m not really sure how to pursue this yet :confused:


I love this, it reminds me a lot of hackerrank but with Streamlit.

@andfanilo when you say your having trouble with multiple statements what do you mean (can you give me a code example to reproduce)?

Happy Streamlit-ing!

Oh…for some reason

c = """def yo(a,b):    
    return a+b         
def add_numbers(a,b):  
    return yo(a,b)     

works in ipython but

def yo(a,b):
    return a+b

def add_two_numbers(a, b):
    return yo(a,b)

does not work in my app. Had not had a chance to debug but if you have the solution that would be awesome :slight_smile:

Hey @andfanilo, you have to pass a global dictionnary to exec to make it work:

exec(f"{content}\n{test}", {})

Technical details on why you must do this is described there:


Oh, so very cool!


Hello there. I kinda recorded this on a whim after too many hours of lectures, on how I use live reloading after saving, st.write and for interactive coding lectures with my students.

Since I see from the poll most educators use Streamlit for teaching coding, I’m interested in how you use it too :slight_smile:

Have a nice day,


WOW! :heart_eyes:

amazing @andfanilo! what a great video!

Hi there. In my case, i’m using Streamlit to develop some softwares to use in the field of Quality Control. Those software are being made as part of my scientific research, one had patented and the currently i’m working on will be also. Both of them will be free and available in english (one it’s already online and free to be used). :sunglasses: :nerd_face:

I will sure the next papers i publlish the Streamlit framework gonna referenced!


@randyzwitch @andfanilo This is such a great idea! I recently joined the University of Leuphana to further develop an introductory course to programming with Python (DATAx | Leuphana). Currently, we are setting up a JupyterHub for our over 1500 students that run every winter semester. We also use tools such as otter-grader for the automated gradings but are exploring other ways for giving better feedback and making our content more interactive. I would be very happy to contribute to this project if there is interest and also would be totally down for a Hackaton!


is there an official way i can reference streamlit in my paper?


Hi there,

i was wondering if one could use streamlit as a live polling/survey tool for students (i guess ‘mentimeter’ would be something similar)
The professor asks a question and offers the students a link (or even better a QR code) for a website where they can answer the question.
The professor then starts the poll and shows the live results (as a bar chart/wordcloud/whatever) on a different website or on a locked section of the same website.
I tried to get this done, but failed gloriously. I was wondering if you have any ideas how one could do this.
Thank you,