{"id":53902,"date":"2025-09-20T16:48:19","date_gmt":"2025-09-20T06:48:19","guid":{"rendered":"https:\/\/www.cloudproinc.com.au\/?p=53902"},"modified":"2025-09-20T16:48:21","modified_gmt":"2025-09-20T06:48:21","slug":"build-data-driven-apps-with-streamlit","status":"publish","type":"post","link":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/","title":{"rendered":"Build Data Driven Apps With Streamlit"},"content":{"rendered":"\n<p>In this blog post Build Data Driven Apps With Streamlit That Users Love To Use we will explore how to turn data and Python into interactive apps that your team can use immediately. Whether you are a data scientist, engineer, or technical leader, Streamlit makes it simple to go from prototype to a reliable internal tool.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-streamlit-is-and-why-it-matters\">What Streamlit is and why it matters<\/h2>\n\n\n\n<p>Streamlit is a <a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/category\/python\/\">Python<\/a> framework that lets you build data-driven web apps with minimal boilerplate. You write a regular script, add a few UI widgets, and Streamlit handles the layout, state, and live updates. No JavaScript, no complex front-end builds\u2014just Python.<\/p>\n\n\n\n<p>Streamlit shines for analytics apps, model demos, and internal dashboards where speed of delivery and close proximity to data\/ML code matter. Instead of handing over a static report, you can let users filter, experiment, and decide faster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-technology-behind-streamlit\">The technology behind Streamlit<\/h2>\n\n\n\n<p>Under the hood, Streamlit runs your Python script as a reactive app. Every user interaction (like moving a slider or choosing a filter) triggers a lightweight re-run of the script. Widgets store values and <code>st.session_state<\/code> preserves state across runs. The front-end is a modern React app that communicates with the Python backend over a WebSocket. Heavy work lives in Python, close to your data and libraries such as pandas, NumPy, scikit-learn, and SQLAlchemy.<\/p>\n\n\n\n<p>Two caching layers keep apps fast and cost-efficient:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>st.cache_data<\/code> memoizes the results of data computations (e.g., SQL queries, pandas transforms) with automatic invalidation on code or input changes.<\/li>\n\n\n\n<li><code>st.cache_resource<\/code> persists expensive resources (e.g., database engines, model objects) across reruns and sessions.<\/li>\n<\/ul>\n\n\n\n<p>This reactive model removes most of the plumbing typical in web frameworks, letting you focus on the data logic while still delivering a polished UI.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-when-to-use-streamlit\">When to use Streamlit<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Internal analytics tools and self-serve insights<\/li>\n\n\n\n<li>ML model prototypes, demos, and monitoring dashboards<\/li>\n\n\n\n<li>Data exploration interfaces for operations teams<\/li>\n\n\n\n<li>Event-driven or batch data reviews, not high-traffic consumer apps<\/li>\n<\/ul>\n\n\n\n<p>If you need fine-grained routing, complex multi-tenant auth, or extreme scale, consider pairing Streamlit with a gateway and standard auth provider\u2014or moving to a full web framework once requirements outgrow the prototype.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-set-up-your-environment\">Set up your environment<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install Python 3.9+ and create a virtual environment.<\/li>\n\n\n\n<li><code>pip install streamlit pandas sqlalchemy psycopg2-binary altair<\/code> (adjust drivers for your database).<\/li>\n\n\n\n<li>Run <code>streamlit hello<\/code> to verify the installation.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-build-a-minimal-data-app\">Build a minimal data app<\/h2>\n\n\n\n<p>The example below loads sales data from a database, caches queries, and provides interactive filters, KPIs, and charts.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2cf9181f8d0b87cb80125874b6fb34bb\"><code>import os\nimport pandas as pd\nimport streamlit as st\nfrom sqlalchemy import create_engine, text\n\nst.set_page_config(page_title=\"Sales Explorer\", page_icon=\"\ud83d\udcc8\", layout=\"wide\")\nst.title(\"\ud83d\udcc8 Sales Explorer\")\n\n# 1) Configure secrets and connections\nDB_URL = st.secrets.get(\"DB_URL\", os.getenv(\"DB_URL\", \"postgresql+psycopg2:\/\/user:pass@host:5432\/db\"))\n\n@st.cache_resource\ndef get_engine():\n    return create_engine(DB_URL, pool_pre_ping=True)\n\n@st.cache_data(ttl=600)\ndef load_data(start_date, end_date, region):\n    # Parameterized SQL to avoid injection\n    with get_engine().connect() as conn:\n        query = text(\n            \"\"\"\n            SELECT order_date, region, product, revenue, quantity\n            FROM sales\n            WHERE order_date BETWEEN :start AND :end\n              AND (:region = 'All' OR region = :region)\n            \"\"\"\n        )\n        df = pd.read_sql(query, conn, params={\"start\": start_date, \"end\": end_date, \"region\": region})\n    return df\n\n# 2) Sidebar filters\nst.sidebar.header(\"Filters\")\nstart_date = st.sidebar.date_input(\"Start date\")\nend_date = st.sidebar.date_input(\"End date\")\nregion = st.sidebar.selectbox(\"Region\", &#91;\"All\", \"APAC\", \"EMEA\", \"NA\", \"LATAM\"], index=0)\n\nif start_date &gt; end_date:\n    st.sidebar.error(\"Start date must be before end date\")\n    st.stop()\n\n# 3) Load data with caching\nwith st.spinner(\"Loading data...\"):\n    df = load_data(str(start_date), str(end_date), region)\n\nif df.empty:\n    st.warning(\"No data for the selected filters.\")\n    st.stop()\n\n# 4) KPIs\nc1, c2, c3 = st.columns(3)\nwith c1:\n    st.metric(\"Total Revenue\", f\"${df&#91;'revenue'].sum():,.0f}\")\nwith c2:\n    st.metric(\"Total Quantity\", f\"{df&#91;'quantity'].sum():,.0f}\")\nwith c3:\n    st.metric(\"Avg Order Value\", f\"${(df&#91;'revenue'].sum() \/ max(len(df),1)) :,.2f}\")\n\n# 5) Chart\nimport altair as alt\nchart = (\n    alt.Chart(df)\n    .mark_bar()\n    .encode(\n        x=alt.X(\"product:N\", sort='-y'),\n        y=alt.Y(\"sum(revenue):Q\", title=\"Revenue\"),\n        color=\"region:N\",\n        tooltip=&#91;\"product\", \"region\", alt.Tooltip(\"sum(revenue)\", title=\"Revenue\", format=\",\")]\n    )\n    .properties(height=400)\n)\n\nst.subheader(\"Revenue by product\")\nst.altair_chart(chart, use_container_width=True)\n\n# 6) Details table with download\nst.subheader(\"Order details\")\nst.dataframe(df, use_container_width=True)\n\nst.download_button(\n    \"Download CSV\",\n    data=df.to_csv(index=False).encode('utf-8'),\n    file_name=\"sales.csv\",\n    mime=\"text\/csv\",\n)\n\n# 7) Session state example\nif \"favorites\" not in st.session_state:\n    st.session_state.favorites = set()\n\nproduct_pick = st.selectbox(\"Add a product to favorites\", sorted(df&#91;\"product\"].unique()))\nif st.button(\"Add to favorites\"):\n    st.session_state.favorites.add(product_pick)\n    st.success(f\"Added {product_pick}\")\n\nif st.session_state.favorites:\n    st.info(\"Favorites: \" + \", \".join(sorted(st.session_state.favorites)))\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-key-patterns-for-robust-apps\">Key patterns for robust apps<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-secrets-and-configuration\">Secrets and configuration<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>st.secrets<\/code> for credentials and config; never hardcode secrets in code or repos.<\/li>\n\n\n\n<li>Parameterize SQL to prevent injection, as shown above.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-state-and-navigation\">State and navigation<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>st.session_state<\/code> for user-specific state (filters, selections, temporary data).<\/li>\n\n\n\n<li>Structure multi-page apps by placing scripts under a <code>pages\/<\/code> directory. Streamlit builds the navigation automatically.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-performance\">Performance<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cache queries and expensive transforms with <code>st.cache_data<\/code> and set sensible <code>ttl<\/code> values.<\/li>\n\n\n\n<li>Cache connections and models with <code>st.cache_resource<\/code> to avoid reinitialization.<\/li>\n\n\n\n<li>Prune data early with WHERE clauses, column selection, and aggregation in SQL.<\/li>\n\n\n\n<li>Defer heavy work until needed using <code>st.expander<\/code> and conditional blocks.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ui-and-ux\">UI and UX<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the sidebar for global filters and the main area for content.<\/li>\n\n\n\n<li>Group related content with <code>st.tabs<\/code> and <code>st.columns<\/code>.<\/li>\n\n\n\n<li>Provide clear empty states and helpful error messages using <code>st.warning<\/code> and <code>st.error<\/code>.<\/li>\n\n\n\n<li>Add downloads with <code>st.download_button<\/code> for users who need to export data.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-connecting-to-real-data-sources\">Connecting to real data sources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Relational databases: PostgreSQL, MySQL, SQL Server via SQLAlchemy drivers.<\/li>\n\n\n\n<li>Data warehouses: Use official drivers (e.g., Snowflake, BigQuery) and cache results.<\/li>\n\n\n\n<li>Object storage: Read from S3, GCS, or Azure Blob with signed URLs and <code>pandas<\/code> readers.<\/li>\n\n\n\n<li>APIs: Use requests\/httpx. Cache responses to reduce rate limits and latency.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-testing-and-quality\">Testing and quality<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Extract data transformations into pure functions and unit test them with pytest.<\/li>\n\n\n\n<li>Mock database calls in tests; integration tests can run against a small seeded database.<\/li>\n\n\n\n<li>Lint with ruff or flake8 and format with black to keep scripts clean and readable.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-deployment-options\">Deployment options<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-streamlit-community-cloud\">Streamlit Community Cloud<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect a Git repo, set secrets, and deploy\u2014ideal for prototypes and small teams.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-containers-and-cloud-runtimes\">Containers and cloud runtimes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Package with Docker and run on AWS ECS\/Fargate, EKS, Azure App Service\/Container Apps, or GCP Cloud Run.<\/li>\n\n\n\n<li>Expose port 8501, set health checks, and enable autoscaling based on CPU\/memory.<\/li>\n\n\n\n<li>Use sticky sessions if your load balancer supports it to reduce session churn; otherwise keep session state minimal.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-security\">Security<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Terminate TLS at a reverse proxy (e.g., Nginx, ALB) and restrict access with an identity provider (Azure AD, Okta, Auth0) using the proxy\u2019s auth features.<\/li>\n\n\n\n<li>Scope database credentials to least privilege; rotate secrets and use managed secret stores.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-observability-and-operations\">Observability and operations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log structured events for load times, cache hits, and query durations.<\/li>\n\n\n\n<li>Emit metrics to your monitoring stack and set alerts for error rates and latency.<\/li>\n\n\n\n<li>Profile hotspots locally with <code>cProfile<\/code> or <code>py-spy<\/code> and optimize queries or caching.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-advanced-features-worth-exploring\">Advanced features worth exploring<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Real-time feel: Periodically refresh sections with <code>st.empty()<\/code> and loops, or use shorter cache TTLs for fresh data.<\/li>\n\n\n\n<li>Editable data: <code>st.data_editor<\/code> to collect user edits, with validation before persisting to the database.<\/li>\n\n\n\n<li>Custom components: If needed, integrate specialized JS visualizations via Streamlit Components without rewriting your app.<\/li>\n\n\n\n<li>Large models: Cache model objects with <code>st.cache_resource<\/code> and batch requests where possible.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrap-up\">Wrap up<\/h2>\n\n\n\n<p>Streamlit compresses the app-building lifecycle for data teams. With a reactive Python-first approach, strong caching, and a rich widget set, you can move from notebook to an interactive, reliable tool in days\u2014not months. Start with a focused use case, ship a slice, and iterate with your users. That is how you build data-driven apps that people actually love to use.<\/p>\n\n\n\n<ul class=\"wp-block-yoast-seo-related-links yoast-seo-related-links\">\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/07\/25\/understanding-transformers-the-architecture-driving-ai-innovation\/\">Understanding Transformers: The Architecture Driving AI Innovation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/09\/15\/loading-and-saving-pytorch-weights\/\">Loading and Saving PyTorch Weights<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/09\/15\/build-lean-reliable-net-docker-images-for-production\/\">Build Lean Reliable .NET Docker Images for Production<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/09\/14\/mastering-docker-environment-variables-with-docker\/\">Mastering Docker environment variables with Docker<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/28\/cypher-queries-and-rag-technology-explained\/\">Cypher Queries and RAG Technology Explained<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to build production-ready data apps with Streamlit. From architecture to deployment, practical steps and code to move from notebook to interactive app fast.<\/p>\n","protected":false},"author":1,"featured_media":53903,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Build Data Driven Apps With Streamlit","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.","_yoast_wpseo_opengraph-title":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_twitter-title":"","_yoast_wpseo_twitter-description":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,79,89],"tags":[],"class_list":["post-53902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-python","category-streamlit"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Build Data Driven Apps With Streamlit - CPI Consulting<\/title>\n<meta name=\"description\" content=\"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build Data Driven Apps With Streamlit\" \/>\n<meta property=\"og:description\" content=\"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/\" \/>\n<meta property=\"og:site_name\" content=\"CPI Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-20T06:48:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-20T06:48:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudproinc.com.au\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CPI Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CPI Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/\"},\"author\":{\"name\":\"CPI Staff\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\"},\"headline\":\"Build Data Driven Apps With Streamlit\",\"datePublished\":\"2025-09-20T06:48:19+00:00\",\"dateModified\":\"2025-09-20T06:48:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/\"},\"wordCount\":934,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png\",\"articleSection\":[\"Blog\",\"Python\",\"Streamlit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/\",\"name\":\"Build Data Driven Apps With Streamlit - CPI Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png\",\"datePublished\":\"2025-09-20T06:48:19+00:00\",\"dateModified\":\"2025-09-20T06:48:21+00:00\",\"description\":\"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#primaryimage\",\"url\":\"\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/09\\\/20\\\/build-data-driven-apps-with-streamlit\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cloudproinc.com.au\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build Data Driven Apps With Streamlit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"name\":\"Cloud Pro Inc - CPI Consulting Pty Ltd\",\"description\":\"Cloud, AI &amp; Cybersecurity Consulting | Melbourne\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cloudproinc.com.au\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\",\"name\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"width\":500,\"height\":500,\"caption\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\",\"name\":\"CPI Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"caption\":\"CPI Staff\"},\"sameAs\":[\"http:\\\/\\\/www.cloudproinc.com.au\"],\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/author\\\/cpiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build Data Driven Apps With Streamlit - CPI Consulting","description":"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/","og_locale":"en_US","og_type":"article","og_title":"Build Data Driven Apps With Streamlit","og_description":"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.","og_url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/","og_site_name":"CPI Consulting","article_published_time":"2025-09-20T06:48:19+00:00","article_modified_time":"2025-09-20T06:48:21+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/cloudproinc.com.au\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","type":"image\/png"}],"author":"CPI Staff","twitter_card":"summary_large_image","twitter_misc":{"Written by":"CPI Staff","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#article","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/"},"author":{"name":"CPI Staff","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e"},"headline":"Build Data Driven Apps With Streamlit","datePublished":"2025-09-20T06:48:19+00:00","dateModified":"2025-09-20T06:48:21+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/"},"wordCount":934,"commentCount":0,"publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","articleSection":["Blog","Python","Streamlit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/","url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/","name":"Build Data Driven Apps With Streamlit - CPI Consulting","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#primaryimage"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","datePublished":"2025-09-20T06:48:19+00:00","dateModified":"2025-09-20T06:48:21+00:00","description":"Learn to build data driven apps with Streamlit that are interactive and user-friendly, transforming data into real-time tools.","breadcrumb":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#primaryimage","url":"\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","contentUrl":"\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/20\/build-data-driven-apps-with-streamlit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cloudproinc.com.au\/"},{"@type":"ListItem","position":2,"name":"Build Data Driven Apps With Streamlit"}]},{"@type":"WebSite","@id":"https:\/\/cloudproinc.com.au\/#website","url":"https:\/\/cloudproinc.com.au\/","name":"Cloud Pro Inc - CPI Consulting Pty Ltd","description":"Cloud, AI &amp; Cybersecurity Consulting | Melbourne","publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudproinc.com.au\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudproinc.com.au\/#organization","name":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd","url":"https:\/\/cloudproinc.com.au\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/","url":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","contentUrl":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","width":500,"height":500,"caption":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd"},"image":{"@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e","name":"CPI Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","caption":"CPI Staff"},"sameAs":["http:\/\/www.cloudproinc.com.au"],"url":"https:\/\/cloudproinc.com.au\/index.php\/author\/cpiadmin\/"}]}},"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/09\/build-data-driven-apps-with-streamlit-that-users-love-to-use.png","jetpack-related-posts":[{"id":53918,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/22\/securing-streamlit-environment-vars-with-toml\/","url_meta":{"origin":53902,"position":0},"title":"Securing Streamlit Environment Vars with TOML","author":"CPI Staff","date":"September 22, 2025","format":false,"excerpt":"Protect API keys and credentials in Streamlit using TOML-based secrets, safe local and cloud workflows, and CI\/CD patterns for repeatable, secure deployments.","rel":"","context":"In &quot;Blog&quot;","block_context":{"text":"Blog","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/blog\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png 1x, \/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png 1.5x, \/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png 2x, \/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png 3x, \/wp-content\/uploads\/2025\/09\/a-practical-guide-to-securing-streamlit-environment-vars-with-toml.png 4x"},"classes":[]},{"id":53910,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/21\/build-a-chat-bot-with-streamlit\/","url_meta":{"origin":53902,"position":1},"title":"Build a Chat Bot with Streamlit","author":"CPI Staff","date":"September 21, 2025","format":false,"excerpt":"A practical, friendly guide to designing, building, and shipping a Streamlit chat bot with modern LLMs, retrieval, and secure deployment for teams.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png 1x, \/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png 1.5x, \/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png 2x, \/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png 3x, \/wp-content\/uploads\/2025\/09\/build-a-chat-bot-with-streamlit-an-end-to-end-guide-for-teams.png 4x"},"classes":[]},{"id":53573,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/06\/how-to-code-and-build-a-gpt-large-language-model\/","url_meta":{"origin":53902,"position":2},"title":"How to Code and Build a GPT Large Language Model","author":"CPI Staff","date":"August 6, 2025","format":false,"excerpt":"In this blog post, you\u2019ll learn how to code and build a GPT LLM from scratch or fine-tune an existing one. We\u2019ll cover the architecture, key tools, libraries, frameworks, and essential resources to get you started fast. Table of contentsUnderstanding GPT LLM ArchitectureModel Architecture DiagramTools and Libraries to Build a\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/CreateLLM.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/CreateLLM.png 1x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 1.5x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 2x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 3x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 4x"},"classes":[]},{"id":56899,"url":"https:\/\/cloudproinc.com.au\/index.php\/2026\/01\/29\/3-mistakes-that-quietly-inflate-your-ai-budget\/","url_meta":{"origin":53902,"position":3},"title":"3 Mistakes That Quietly Inflate Your AI Budget","author":"CPI Staff","date":"January 29, 2026","format":false,"excerpt":"AI spend often rises from avoidable design choices. Learn three common mistakes\u2014no caching, unbound context, and the wrong model\u2014and practical steps to reduce costs without hurting quality.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2026\/01\/post-7.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2026\/01\/post-7.png 1x, \/wp-content\/uploads\/2026\/01\/post-7.png 1.5x, \/wp-content\/uploads\/2026\/01\/post-7.png 2x, \/wp-content\/uploads\/2026\/01\/post-7.png 3x, \/wp-content\/uploads\/2026\/01\/post-7.png 4x"},"classes":[]},{"id":53959,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/09\/25\/supercharge-langchain-apps-with-an-llm-cache\/","url_meta":{"origin":53902,"position":4},"title":"Supercharge LangChain apps with an LLM Cache","author":"CPI Staff","date":"September 25, 2025","format":false,"excerpt":"Cut latency and costs by caching LLM outputs in LangChain. Learn what to cache, when not to, and how to ship in-memory, SQLite, and Redis caches.","rel":"","context":"In &quot;Blog&quot;","block_context":{"text":"Blog","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/blog\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png 1x, \/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png 1.5x, \/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png 2x, \/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png 3x, \/wp-content\/uploads\/2025\/09\/supercharge-langchain-apps-with-an-llm-cache-for-speed-and-cost.png 4x"},"classes":[]},{"id":57225,"url":"https:\/\/cloudproinc.com.au\/index.php\/2026\/03\/13\/what-business-leaders-should-know-about-ai-driven-engineering\/","url_meta":{"origin":53902,"position":5},"title":"What Business Leaders Should Know About AI Driven Engineering","author":"CPI Staff","date":"March 13, 2026","format":false,"excerpt":"AI is changing how software gets built, tested and maintained. Here is what leaders need to know about speed, risk and governance.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2026\/03\/post-14.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2026\/03\/post-14.png 1x, \/wp-content\/uploads\/2026\/03\/post-14.png 1.5x, \/wp-content\/uploads\/2026\/03\/post-14.png 2x, \/wp-content\/uploads\/2026\/03\/post-14.png 3x, \/wp-content\/uploads\/2026\/03\/post-14.png 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=53902"}],"version-history":[{"count":2,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53902\/revisions"}],"predecessor-version":[{"id":53905,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53902\/revisions\/53905"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media\/53903"}],"wp:attachment":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=53902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=53902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=53902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}