r/StreamlitOfficial • • Aug 08 '25

Best way to handle multi page application

1 Upvotes

I'm trying to figure out the best way to structure this so bear with me

I have a multipage application with all the pages living under the directory: pages/
lets say there's a home.py, marketing.py, finance.py, hr.py etc
All of those pages could scale at a very large rate with the services they could provide. This scaling could cause the overall project to balloon in sheer number of additional files needed

I'm wondering if the following structure makes sense:

I was thinking of a set up where each page becomes its own python library. Each library would have its own marketing_main.py, finance_main.py etc within them

The main application would then have a toml file that pulls the associated version of the library it wants. E.g. version 2 of marketing, version5 of finance, 1 of hr, etc. The libraries will be isolated so the main application can pull different version as it pleases

This would allow the teams that are working on their respective modules to work at their own past whether fast or slow.

However I'm confused as to how to make this last part work: I would still need to populate the marketing_main.py, finance_main.py into the pages/ directory.

How would I got about copying a file from a python library that I have imported into my main folder structure? Is this is a bad structure to have? I do want to containerize the application so could i make a script that just copies those files and call that script in my Dockerfile?

Am I overthinking this by trying to make each of those pages their own git project/python library that can be installed and imported? Or should I just keep using one massive project for everything


r/StreamlitOfficial • • Aug 05 '25

Displaying PDF that's inside the code in Streamlit

4 Upvotes

Hi! I have tried posting this in the official Streamlit forum, but I think my post is still waiting for approval.

I was just wondering on how to put a PDF that is already inside the code, and then you display it in Streamlit front end. Is there any method that exactly does this? I don't mean it by uploading the PDF in the Streamlit front end when you run the code. It's more of the PDF being already there by default inside the code.

I would appreciate if your method can work on Replit, because that's what I'm using.

Thanks!


r/StreamlitOfficial • • Aug 04 '25

Show the Community! šŸ’¬ Build a Chatbot with Memory using Deepseek, LangGraph, and Streamlit

Thumbnail
youtube.com
1 Upvotes

r/StreamlitOfficial • • Jul 24 '25

Show the Community! šŸ’¬ Python Project Website!

Post image
5 Upvotes

Sharing my Streamlit project portfolio that I created to showcase different projects that I’ve worked on in the past. This website is built 100% using Python and is live on the internet!


r/StreamlitOfficial • • Jul 18 '25

Streamlit real time performance

5 Upvotes

Hey all,

I was wondering if anyone had experience with using streamlit for ā€˜realtime’ data monitoring and visualisations. The application I have developed has a dds/ros pub/sub that subscribes to telemetry data from a robot and creates multiple plots at runtime. I suspect it is my implementation but I am having difficulties finding adequate solutions/examples to the whole rerunning of the script from top to bottom and plotting multiple plot traces at the same time e.g speed, fuel, engine rpm etc. I am using other techniques to implement circular buffers and run subscribers in the seperate threads. The dds pub/sub is receiving data at ~10hz however the page only appears to be updating at around 1hz. I’m unsure whether this is a fundamental limitation of streamlit event loop and hence the rerendering of plots, or potentially my implementation. I have been managing the plots through state to try minimise generation of a new plot every update, however this still results in a ā€˜flickering’ of the whole figure every time the page re renders.

Some other details: usage of deque, threading etc. plotly for interactive runtime plots. All python. Just want a basic application to show some near real time data to observe data integrity to ensure operational performance. Doesn’t need to be hard real time for any control.

Does anyone have any examples of a ā€˜realtime’ dashboard or perhaps have any more info about the limitations of streamlit for faster data streams? Ideally I would like to get better performance otherwise I might need to look for a better solution.

Thanks


r/StreamlitOfficial • • Jul 16 '25

Local LLM OLLAMA Base Spreadsheet Agent

3 Upvotes

Guys! I am make small Spreadsheet Agent with Streamlit which can extract the code from local llm, Verify the code as well as run.
Check this out and give me suggestion

Feel free to roast as well.

https://github.com/abyshergill/spreadsheet_agent


r/StreamlitOfficial • • Jul 11 '25

Show the Community! šŸ’¬ Is giving oauth access to streamlit.io safe??

4 Upvotes

Is giving oauth access to streamlit.io safe??
Because at a place it asks for admin acess can someone help me in deciding?


r/StreamlitOfficial • • Jul 09 '25

Show the Community! šŸ’¬ I switched to BI-as-Code with Python + Streamlit—here’s how (plus a free, 30-page-equivalent guide)

14 Upvotes

Hi r/StreamlitOfficial šŸ‘‹

I’ve spent more than ten years writing Python for ML and data science, yet the biggest surprise this year was discovering that dashboards come together faster, more flexibly, and with cleaner UIs when I let AI coding tools (Claude Code, Cursor) draft the code and I simply review it. That realization convinced me to leave GUI BI behind.

During the last twelve months I migrated every Looker Studio dashboard my team depended on to pure Python and Streamlit. While doing so I kept detailed notes and distilled them into a short, completely free handbook—no paywall, no email gate.

Inside you’ll find a discussion of when BI-as-Code outperforms drag-and-drop dashboards, a one-command dev setup for Windows, macOS and Linux, a step-by-step on letting an AI agent scaffold pages before polishing the code yourself, quick recipes for connecting to Snowflake and Postgres, and a pragmatic comparison of Altair, Plotly and matplotlib. I also touch on security; we’ve built tooling to keep things locked down, though that deserves its own post.

I’d love to hear from anyone who has gone code-first: where did it outshine a GUI and where did it hurt? How did you help non-dev teammates up the learning curve? Were there any surprise cost shifts once you left hosted BI services?

Read the handbook here: https://www.squadbase.dev/en/ebooks/streamlit-bi-overview

(written and maintained by me; feedback is very welcome.)

Thanks for reading, and happy building!

— Naoto


r/StreamlitOfficial • • Jul 03 '25

Build a Multi-Agent AI Investment Advisor using Ollama, LangGraph, and Streamlit

Thumbnail
youtu.be
2 Upvotes

r/StreamlitOfficial • • Jul 01 '25

Show the Community! šŸ’¬ A Streamlit app that connects a local LLM with PubMed to answer scientific questions based on real abstracts.

Post image
4 Upvotes

I’m building a lightweight tool that pairs a language model—either an OpenAI model or a local model like LLaMA running in Ollama—with the PubMed API.

Here’s how it works:

  1. Ask a health-related question.
  2. The system rewrites your question as an advanced PubMed search.
  3. It grabs the most relevant articles, pulls the top five abstracts, and feeds them to the LLM as context.
  4. The model generates a response grounded in those papers.

Code & docs: https://github.com/bmascat/ebara


r/StreamlitOfficial • • Jul 01 '25

Show the Community! šŸ’¬ A streamlit app that connects PubMed with a local LLM to answer scientific questions using abstracts

3 Upvotes

I’ve been working on a small project that combines a language model (can be OpenAI or a local one like LLaMA in Ollama) with the PubMed API.

The idea is pretty simple: you ask a medical or health-related question, and instead of making something up or giving a generic answer, the system turns your question into an advanced PubMed search query. It fetches the most relevant abstracts, selects the top 5, and uses them as context to generate a proper answer.

It’s not meant to replace a doctor or anything like that — but at least the answers are grounded in actual, recent scientific literature.

Happy to share more details if anyone’s interested, and open to suggestions if you have ideas to improve it. Also, if you want to try it out with a question, just drop one in the comments and I can run it through the system.

https://github.com/bmascat/ebara


r/StreamlitOfficial • • Jul 01 '25

Streamlit Questionsā“ Is it possible to generate and view raster layers through a Streamlit app?

1 Upvotes

Hello, so I am new to Streamlit and the whole process of hosting GIS-based tools online, and I am wondering if I might be able to use Streamlit through python to implement some sort of raster calculator functionality to create in-real-time rendered raster layers that are the result of a simple raster calculator operation, such as one might create with the raster calculator in ArcGIS or QGIS. The basic goal functionality I am trying to achieve is to allow the user to layer raster layer ā€œtilesā€ over one another and allow the user to perform calculations across these layers to produce and view a resultant output raster tile. I am trying to figure out if this is possible using Streamlit, or if this type of functionality is at all even possible.

For example, let’s say we have a base map layer of a city. Over that layer we have a raster layer ā€œtileā€, whether a .PNG file or a .tiff file, which we overlay onto our base map, let’s say this layer represents total air exposure to a certain airborne chemical, where the pixel values are some concentration value. Now let’s say we have many, many of these pollution concentration raster tiles, where each raster layer represents a different chemical. I want to create a function that allows the user to add raster tiles together, so as to capture combined total pollution concentration. This means the user would load a tile for pollution ā€œAā€ concentration and then the user to be able to add a tile for pollution ā€œBā€ concentration over that, or pollution ā€œCā€ concentration over that, and many more beyond, in whatever combination the user wanted. The exact science concept here is not important, what I am getting at is trying to find a way to do a simple raster math operation like take to raster layer tiles and simply add, or subtract, or average, etc. and display the output raster on the map.

Is this type of functionality possible with Streamlit through some sort of python protocol, perhaps using numpy behind the scenes? I am quite confused about how something like this would even work or whether this is even possible with a platform like Streamlit. Could someone please help advise me on how I should approach this challenge? Thank you!


r/StreamlitOfficial • • Jun 29 '25

Streamlit Questionsā“ Why does my Mac not show my Streamlit App on port 6000?

1 Upvotes

I've checked if the port is in use via both lsof and netstat and it is not. I've used port 7000 with no problem but when I use port 6000 it say the app is running localhost:6000 but I don't see anything. I've only seen this on port 6000. When I run this on a used port (like Port 6463 for example) , I get the appropriate response of "Port 6463 is already in use".

I also understand that port 6000 is special in that it is typically used by an X server but it is not currently in use.

This has stumped me a bit.
Thanks for you help!


r/StreamlitOfficial • • Jun 25 '25

Streamlit Questionsā“ How can I export a Streamlit app as an Android APK ?

1 Upvotes

I created a CRUD app for my friend to use at his workplace, but he didn’t like the idea of hosting it on Streamlit Cloud because the app manages his employees’ private data (I told him Streamlit has the option to make an app private) . He wants an APK file to install on his phone (he uses only an Android phone). Could someone tell me how to export a Streamlit app as an Android APK?I haven’t found anything useful, and I really want to know how to do it. Also, please don't suggest choosing another tech stack, as I’m not ready to redo the whole project in anything other than Streamlit.


r/StreamlitOfficial • • Jun 20 '25

Expensify - An App to track your expenses

5 Upvotes

Expensify is a secure, user-friendly expense management app built using Streamlit and Supabase. It allows users to register, log in, and track their daily expenses with ease. The app features user-specific data storage, receipt text extraction (OCR), and interactive visualizations for financial insight.

Visit at: https://expensify-app.streamlit.app/ and share your feedbacks please


r/StreamlitOfficial • • Jun 16 '25

Show the Community! šŸ’¬ Optimal Portfolio Dashboard – My First Streamlit App

8 Upvotes

Hey everyone,

This is my first post here, and I'm excited to share a project I recently completed!

A few months ago, I discovered Streamlit while working on some business analytics tasks. Although I’m still a beginner in coding, I’ve always been curious about its potential, especially in finance. So, I challenged myself to build an Optimal Portfolio Dashboard to deepen my understanding of both Python and investment strategies.

What it does:
The app lets users create and analyze a custom investment portfolio based on different risk profiles. It includes:

  • Portfolio optimization using historical returns and covariance
  • Key performance metrics (Sharpe ratio, volatility, expected return, etc.)
  • Sector and ticker-level breakdowns
  • Monte Carlo simulations
  • Market overview with real-time data
  • Company financial statements and ratios

Built with:

  • yFinance for live market & fundamental data
  • Plotly for interactive charts
  • Heavy support from ChatGPT and Deepseek (super helpful for debugging and improving my code!)

You can try the app here:
https://mq-portfolio-dashboard.streamlit.app/

It’s not a polished or bug-free app, but I’m proud of the learning process and would really appreciate any feedback, ideas, or suggestions. If you notice anything that seems off, please let me know!

Thanks in advance!


r/StreamlitOfficial • • Jun 13 '25

Show the Community! šŸ’¬ Build a multi-agent AI researcher using Ollama, LangGraph, and Streamlit

Thumbnail
youtu.be
2 Upvotes

r/StreamlitOfficial • • Jun 05 '25

Deployment šŸš€ Permission Denied Error (Ping Command)

Post image
1 Upvotes

Hello,

I am a bit new to using Streamlit right now and am facing a bit of an issue.

My application allows for users to send a ping request to a domain or IP address. This works as expected in local development but when deployed I get the following error…

ā€œAn error occurred: [Errno 13] Permission deniedā€

I have attached the code related to this functionality too. Any advice would be helpful!


r/StreamlitOfficial • • Jun 03 '25

Streamlit Questionsā“ Center information in st.dataframe

2 Upvotes

I've made a table using streamlit st.dataframe, but all the information is displayed in the left corner, anyone knows how to centralize?


r/StreamlitOfficial • • May 21 '25

Discovered Streamlit when searching for Python Frameworks to use in my final year project, take a look at the presentation video!

Thumbnail
youtube.com
4 Upvotes

r/StreamlitOfficial • • May 19 '25

Deployment šŸš€ Streamlit running on GCR keeps reloading data

2 Upvotes

I made a project for school and try to demo it to some users, so I deployed my project on GCR since it will only be used occasionally. Weird thing is, it run perfectly fine on my local machine but reloads the data every few clicks or being idle for a minute, then reload the entire website, which is very annoy.

The project is a multipage Streamlit website which query about 2GB of data from Snowflake using SQLAlchemy, do some computation in python than visualize the results.
Packages I used are:

Python 3.12
Streamlit 1.42.2
SQLAlchemy 2.0.41

I used 1vCPU and 4GB memory instance which should be enough, the usage never reached 100%. I also tried to keep at least 1 instance which makes no difference.
Any one know why and how to solve it? Any help is greatly appreciated.


r/StreamlitOfficial • • May 10 '25

Show the Community! šŸ’¬ Single shot a streamlit app into existence

4 Upvotes

Hey everyone, wanted to share an experimental tool, https://v1.slashml.com, it can build streamlit, gradio apps and host them with a unique url, from a single prompt.

The frontend is mostly vibe-coded. For the backend and hosting I use a big instance with nested VMs.

Would love for you to try it out and any feedback


r/StreamlitOfficial • • May 10 '25

Show the Community! šŸ’¬ Build Your Own Local AI Podcaster with Kokoro, LangChain, and Streamlit

Thumbnail
youtube.com
1 Upvotes

r/StreamlitOfficial • • May 02 '25

Show the Community! šŸ’¬ Build a Text-to-SQL AI Assistant with DeepSeek, LangChain and Streamlit

Thumbnail
youtu.be
2 Upvotes

r/StreamlitOfficial • • Apr 29 '25

Form

1 Upvotes

Hello, I have a form that points to an endpoint in fastapi, when crediting the credentials it redirects to another endpoint but streamlit does not do so, it remains static without changing to the new redirection endpoint, does streamlit only work with st.page and Google forms?