Squadbase
Squadbase Docs

Streamlit

Learn how to leverage Squadbase features with Streamlit.

Streamlit is an open-source library that lets you build intuitive web apps quickly with simple Python, making it perfect for internal AI applications that integrate LLM APIs to boost productivity.

With Squadbase, delivering a Streamlit app gives you all of the following out of the box:

  • Deployment to an invitation-only, secure cloud environment
  • Built-in user authentication
  • User analytics
  • Log monitoring
  • In-app feedback collection from users

Sample apps

Explore apps built with Streamlit. With Squadbase, you can deploy apps like these to a secure cloud and operate them safely inside your organization.

Resources

Handy references for developing with Streamlit:

Create a new Streamlit app

Below is the Squadbase-recommended approach using uv to set up a new project.

Initialize the project and install dependencies:

Terminal
uv init my-streamlit-app
cd my-streamlit-app
uv add streamlit

Create a starter app:

Terminal
streamlit init

The generated file looks like this:

streamlit_app.py
import streamlit as st
 
st.title("🎈 My new app")
st.write(
    "Let's start building! For help and inspiration, head over to [docs.streamlit.io](https://docs.streamlit.io/)."
)

Run the app locally:

Terminal
streamlit run streamlit_app.py

You're ready to build! 🎉 For more details, see the official Streamlit docs.

Deploy with GitHub integration

Create squadbase.yml

Add squadbase.yml to the root of your codebase—e.g. if you have app.py and pyproject.toml:

app.py
pyproject.toml
squadbase.yml

A minimal configuration:

squadbase.yml
version: "1"
 
build:
  framework: streamlit
  runtime: python3.11  # Supported: python3.9, python3.10, python3.11, python3.12, python3.13
  package_manager: uv # Supported: pip, poetry, uv
  entrypoint: app.py

If you set package_manager to pip, make sure to have a requirements.txt file in your project root.

See the reference for customization options.

For customizing the deployment environment (like installing OS-level packages) or to check the Dockerfile that will be built, see this guide.

For Streamlit, deployment.provider currently supports only gcp.

Import your GitHub repo into Squadbase

From the dashboard home, import your GitHub repository. Deployment starts automatically after the import completes.

Push and deploy

Commit changes, push to GitHub, and a new deployment kicks off automatically.

Make the most of Squadbase features

Squadbase offers more than deployment—it streamlines development and operations for internal apps.

User authentication & member management

When a Squadbase team member opens your app, authentication happens automatically. If the app isn't public, only authenticated users can access it. Each user can also have a project role.

From Streamlit Python code, you can fetch user info (including project roles) and tailor behavior accordingly:

# app.py
import streamlit as st
import squadbase.streamlit as sq
 
user_info = sq.auth.get_user()
st.write(f"Hello, {user_info['firstName']} {user_info['lastName']}")
 
if "admin" in user_info['roles']:
  st.write("You are an admin")
else:
  st.write("You are not an admin")

To fetch Squadbase user info from Streamlit, install squadbase-streamlit.

User analytics

Squadbase automatically collects access logs and exposes usage analytics—no extra code required.

User Analytics

Log monitoring

View runtime and access logs for each deployment (and each version) directly in the dashboard.

Log Monitoring

Feedback

Every deployed app includes a comment box so team members can submit feedback.

Feedback

On this page