Skip to main content

sisx

A command-line interface (CLI) for managing Streamlit applications in Snowflake.

Overview

sisx provides a set of commands to simplify the workflow for developing, deploying, and managing Streamlit applications on Snowflake. It handles common tasks like deploying applications, creating preview versions, and cleaning up old deployments.

Installation

uv tool install sisx

# Or

pip install sisx

If you don't want to actually install the tool permanently, you can just run uvx sisx <any command> to use it.

CLI

sisx CLI tool for Streamlit in Snowflake applications

Usage:

$ [OPTIONS] COMMAND [ARGS]...

Options:

  • --version: Show the version and exit.
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • deploy: Deploy a Streamlit application using the...
  • deploy-preview: Deploy a preview version of a Streamlit...
  • drop: Drop a Streamlit application from Snowflake.
  • drop-preview: Drop a preview version of a Streamlit...
  • new: Create a new Streamlit in Snowflake...
  • run: Run a Streamlit application locally.
  • test: Run the tests for the CLI.
  • cleanup: Drop multiple Streamlit applications...
  • new-connection: Add a new Snowflake connection configuration.

deploy

Deploy a Streamlit application using the Snowflake CLI.

This command wraps the snow streamlit deploy command, providing a convenient interface for deploying Streamlit applications to Snowflake.

By default, opens the app in your browser. Use --no-open to disable.

Usage:

$ deploy [OPTIONS]

Options:

  • -v, --verbose: Enable verbose output
  • -r, --replace: Replace the Streamlit app if it already exists
  • --no-open: Don't open the deployed Streamlit app in a browser
  • -c, --connection TEXT: Connection to use for deployment
  • --query-warehouse TEXT: Override the query warehouse to use
  • --app-warehouse TEXT: Override the app warehouse to use
  • --debug: Enable debug output
  • --help: Show this message and exit.

deploy-preview

Deploy a preview version of a Streamlit application.

This command adds 'preview_' to the beginning of the app name and also adds 'PREVIEW: ' to the app title, making it easy to identify preview deployments.

By default, opens the app in your browser. Use --no-open to disable.

Usage:

$ deploy-preview [OPTIONS]

Options:

  • --preview-name TEXT: Name of the preview app
  • -v, --verbose: Enable verbose output
  • -r, --replace: Replace the Streamlit app if it already exists
  • --no-open: Don't open the deployed Streamlit app in a browser
  • -c, --connection TEXT: Connection to use for deployment
  • --debug: Enable debug output
  • --help: Show this message and exit.

drop

Drop a Streamlit application from Snowflake.

This command will remove the Streamlit app. If --drop-spcs is specified, it will also clean up any associated SPCS services.

Usage:

$ drop [OPTIONS]

Options:

  • -v, --verbose: Enable verbose output
  • -c, --connection TEXT: Connection to use for deployment
  • -f, --force: Force drop without confirmation
  • --drop-spcs: Also drop any associated SPCS services
  • --help: Show this message and exit.

drop-preview

Drop a preview version of a Streamlit application from Snowflake.

This command will remove the preview Streamlit app (with prefix 'preview_'). If --drop-spcs is specified, it will also clean up any associated SPCS services.

Usage:

$ drop-preview [OPTIONS]

Options:

  • -v, --verbose: Enable verbose output
  • -c, --connection TEXT: Connection to use for deployment
  • -f, --force: Force drop without confirmation
  • --drop-spcs: Also drop any associated SPCS services
  • --help: Show this message and exit.

new

Create a new Streamlit in Snowflake application using a template.

This command uses snow init to generate a new app from the appropriate template based on your compute choice (warehouse or compute pool).

All configuration can be provided via command line flags for automation, or will be prompted for interactively if not provided.

Usage:

$ new [OPTIONS] [OUTPUT_DIR]

Arguments:

  • [OUTPUT_DIR]: Directory where the new app will be created

Options:

  • -f, --force: Force creation of app, overwriting existing directory
  • -c, --connection TEXT: Name of the connection to use
  • -v, --verbose: Enable verbose output
  • -t, --compute-type TEXT: Type of compute to use: 'warehouse' or 'compute_pool' [default: warehouse]
  • -q, --query-warehouse TEXT: Warehouse to use for queries (when using warehouse compute type)
  • -a, --app-warehouse TEXT: Warehouse to use for running the app (when using warehouse compute type)
  • --compute-pool TEXT: Compute pool to use (when using compute_pool compute type)
  • --stage TEXT: Stage to use for app artifacts
  • --database TEXT: Database to use for the app
  • --schema TEXT: Schema to use for the app
  • --role TEXT: Role to use for the app
  • --debug: Enable debug output
  • --help: Show this message and exit.

run

Run a Streamlit application locally.

This command wraps the streamlit run command, providing a convenient interface for running Streamlit applications during development.

Usage:

$ run [OPTIONS] [APP_PATH]

Arguments:

  • [APP_PATH]: Path to the Streamlit app file to run [default: streamlit_app.py]

Options:

  • --help: Show this message and exit.

test

Run the tests for the CLI.

Usage:

$ test [OPTIONS]

Options:

  • --help: Show this message and exit.

cleanup

Drop multiple Streamlit applications containing the specified filter text.

If no filter is provided, uses the text 'preview_' as the filter. This is useful for cleaning up development apps in your account.

Usage:

$ cleanup [OPTIONS] [FILTER_TEXT]

Arguments:

  • [FILTER_TEXT]: Text to filter apps by (uses preview_ if not specified)

Options:

  • -v, --verbose: Enable verbose output
  • -c, --connection TEXT: Connection to use for deployment
  • -f, --force: Force cleanup without confirmation
  • --drop-spcs: Also drop any associated SPCS services
  • --help: Show this message and exit.

new-connection

Add a new Snowflake connection configuration.

This command wraps the snow connection add command, providing a convenient interface for adding new Snowflake connections.

Usage:

$ new-connection [OPTIONS]

Options:

  • -n, --connection-name TEXT: Name of the new connection.
  • -a, --account, --accountname TEXT: Account name to use when authenticating with Snowflake.
  • -u, --user, --username TEXT: Username to connect to Snowflake.
  • -p, --password TEXT: Snowflake password.
  • -r, --role, --rolename TEXT: Role to use on Snowflake.
  • -w, --warehouse TEXT: Warehouse to use on Snowflake.
  • -d, --database, --dbname TEXT: Database to use on Snowflake.
  • -s, --schema, --schemaname TEXT: Schema to use on Snowflake.
  • -h, --host TEXT: Host name the connection attempts to connect to Snowflake.
  • -P, --port INTEGER: Port to communicate with on the host.
  • -R, --region TEXT: Region name if not the default Snowflake deployment.
  • -A, --authenticator TEXT: Chosen authenticator, if other than password-based
  • -k, --private-key, --private-key-file, --private-key-path TEXT: Path to file containing private key
  • -t, --token-file-path TEXT: Path to file with an OAuth token that should be used when connecting to Snowflake
  • --default: If provided the connection will be configured as default connection.
  • -v, --verbose: Enable verbose output
  • --debug: Enable debug output
  • --help: Show this message and exit.

Configuration

sisx uses the snowflake.yml file in your project directory for configuration. This defines your app's name, database, schema, and other settings.

Example snowflake.yml for warehouse compute type:

definition_version: "2"
env:
  name: "my_app"
  query_warehouse: "compute_wh"
  app_warehouse: "SYSTEM$STREAMLIT_NOTEBOOK_WH"
  schema: "public"
  database: "streamlit"
  role: "ACCOUNTADMIN"
  preview_database: "streamlit"
  preview_schema: "public"
  preview_role: "ACCOUNTADMIN"
  stage: "streamlit_stage"
entities:
  streamlit_app:
    type: streamlit
    identifier:
      name: <% ctx.env.name %>
      schema: <% ctx.env.schema %>
      database: <% ctx.env.database %>
    stage: <% ctx.env.stage %>
    query_warehouse: <% ctx.env.query_warehouse %>
    main_file: streamlit_app.py
    pages_dir: pages/
    artifacts:
      - "**/*.py"
      - "*.yml"

Example snowflake.yml for compute pool type:

definition_version: "2"
env:
  name: "my_app"
  compute_pool: "streamlit_compute_pool"
  schema: "public"
  database: "streamlit"
  preview_database: "streamlit"
  preview_schema: "public"
  preview_role: "ACCOUNTADMIN"
  stage: "streamlit_stage"
entities:
  streamlit_app:
    type: streamlit
    identifier:
      name: <% ctx.env.name %>
      schema: <% ctx.env.schema %>
      database: <% ctx.env.database %>
    stage: <% ctx.env.stage %>
    compute_pool: <% ctx.env.compute_pool %>
    main_file: streamlit_app.py
    pages_dir: pages/
    artifacts:
      - "**/*.py"
      - "requirements.txt"
      - "*.yml"

Version Information

You can check the version of sisx by running:

uvx sisx --version

License

MIT

Metadata

Release files for sisx 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sisx 0.1.9
File Size Uploaded
sisx-0.1.9.tar.gz 137.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sisx 0.1.9
File Interpreter ABI Platform
sisx-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 161.4 kB

Release files / sisx-0.1.9.tar.gz

Download URL sisx-0.1.9.tar.gz
Size 137.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c6f4877b1a22284782fc6858b1ebc38a90accb105349f334cb156e3b59f36f86
BLAKE2b-256 checksum
How to use checksums
ca2a72403f13f32ccaa8310ae01fcef8bffb9bfe4f0150e4cde02fa55d3d7cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.18

Release files / sisx-0.1.9-py3-none-any.whl

Download URL sisx-0.1.9-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dcf6553b50f353e5f43b1b5df71ed0ebd6661d804f3ce5222c83ebff359195a
BLAKE2b-256 checksum
How to use checksums
abf0b733d86bfee17fd3c4ccf59ab38590dfcfb6ea4d5a35f48e21a4cccfb360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.18

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page