- Home
- Skills
- Sfc Gh Dflippo
- Snowflake Dbt Demo
- Streamlit Development
streamlit-development_skill
- Python
26
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill sfc-gh-dflippo/snowflake-dbt-demo --skill streamlit-development- connections.py1.2 KB
- SKILL.md9.8 KB
Overview
This skill helps you develop, test, and deploy Streamlit data applications that run both locally and inside Snowflake's native Streamlit environment. It provides connection patterns, development and testing workflows, deployment commands, and Snowflake-specific constraints. Use it to structure apps for reliability, performance, and secure Snowflake integration.
How this skill works
It supplies a recommended session pattern that detects an active Snowflake session and falls back to a local Snowpark Session, with caching to avoid reconnection overhead. It outlines local environment setup, pytest and Playwright testing guidance, deployment options (Snow CLI or schemachange), and Snowflake package and API limitations to keep apps portable. It also lists code organization, performance, and security patterns tailored for Streamlit on Snowflake.
When to use it
- Building interactive Streamlit dashboards that query Snowflake via Snowpark
- Setting up local development that mirrors Snowflake runtime behavior
- Writing unit/integration tests with pytest and browser tests with Playwright
- Preparing apps for deployment to Snowflake using the Snow CLI or schemachange
- Optimizing performance, caching, and session reuse in production apps
Best practices
- Use a cached get_snowpark_session() that tries get_active_session() then falls back to a local Session
- Separate data access logic from UI code (modularize SQL into helpers/classes)
- Cache data with @st.cache_data and cache the Snowpark session with @st.cache_resource
- Group multi-field inputs inside st.form to avoid reruns and use explicit widget keys to prevent DuplicateWidgetID errors
- Limit nested columns to two levels and handle errors with user-friendly messages and guidance
Example use cases
- Interactive sales or finance dashboards that query Snowflake with Snowpark and present filters and charts
- Forms-driven data entry for customers or transactions with server-side validation and role-based controls
- Automated browser tests validating navigation, responsive layouts, and form behavior using Playwright MCP
- Deploying a vetted Streamlit app to Snowflake with environment.yml that only lists non-default packages
- Including Streamlit deployment as part of migration pipelines using schemachange
FAQ
Do not include streamlit or snowflake-snowpark-python in environment.yml; Snowflake supplies those. Only list non-default packages like pandas or plotly and check Snowflake Anaconda repo for availability.
How do I avoid session-related errors locally?
Use the provided get_snowpark_session() pattern that tries get_active_session() and falls back to Session.builder with a named connection; cache it with @st.cache_resource to prevent reconnections.