Hybrid architecture media server, media service and Streamlit client app using FastAPI and Python


Media Explorer App GitHub Repo

I previously posted about a simple media server app. Well I re-implemented it!

Now I have something that (from a single codebase) can be deployed (1) locally or in Streamlit Cloud, or (2) with an embedded FastAPI image server, or (3) as a distributed app comprising a Streamlit client + remote FastAPI image server. It was an experiment to use some software architectural concepts to tidy up the original application and enable flexible deployments.

The image server capability isn’t as important to me as the application structure, which I want to adopt in other apps I’m building or need to clean up because they’ve got too big and inflexible.

I hope some of you may learn a few things from this app in terms of application architecture and design, FastAPI (how easy it is!), using Streamlit forms, callbacks, session state including initializing and making widget values sticky between implicit and explicit reruns, custom styling/themes, controlling layout, and launching external threads and server processes from a Streamlit app.

Let me know what you think… shoot me a DM or post questions in GitHub.



This is so cool @asehmi ! Thank you for sharing this



1 Like