Skip to main content

sis-extras

Overview

The sis-extras package provides a set of Python utilities designed to help you develop beautiful, performant streamlit-in-snowflake apps.

Currently, this package includes modules for managing database connections (connection.py) and creating interactive data tiles (formatting.py).

Installation

To install sis-extras, you can use pip:

pip install sis-extras

Modules

connection.py

This module handles connections to Snowflake databases, providing functionality to manage sessions and execute SQL queries directly, returning results in a Pandas DataFrame format.

Key Functions:

  • SnowparkConnection: Manages Snowflake database connections.
  • get_data_frame_from_raw_sql: Executes a SQL query and returns the results as a Pandas DataFrame.
  • get_pandas_df: Converts a Snowpark DataFrame to a Pandas DataFrame.
  • join_cached: Provides a cached mechanism for joining two Snowpark DataFrames.

formatting.py

This module aids in the visualization of data using Streamlit, Altair, and Plotly, focusing on creating interactive tiles that can display data, charts, and SQL queries.

Key Functions:

  • tile: Creates a tile in Streamlit that can display a chart, data preview, SQL query, and a description.
  • tile_ctx: A context manager version of tile for more flexible content management within a tile.
  • altair_time_series: Generates a time series chart using Altair, designed to handle specific formatting and tooltip requirements.

Usage Examples

Using SnowparkConnection

from sis_extras.connection import get_table, get_data_frame_from_raw_sql, get_pandas_df

# Use Snowpark API

table = get_table("your_table").limit(10)

table_pd = get_pandas_df(table)

st.write(table_pd)

# Use SQL

table_pd = get_data_frame_from_raw_sql("SELECT * FROM your_table")

st.write(table_pd)

Creating a Data Tile

from sis_extras.formatting import tile
import pandas as pd
import altair as alt

# Sample DataFrame

data = pd.DataFrame({
    'x': range(10),
    'y': range(10)
})

# Sample Chart

chart = alt.Chart(data).mark_line().encode(
    x='x',
    y='y'
)

# Create a tile with data and chart

tile(data, "Sample Tile", chart=chart, sql="SELECT x, y FROM your_table")

Shows a tile with data and chart

Metadata

Release files for sis-extras 0.1.3

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

Source distribution (sdist)

Source distribution for sis-extras 0.1.3
File Size Uploaded Provenance Actions
sis_extras-0.1.3.tar.gz 7.7 kB Without provenance Details for sis_extras-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sis-extras 0.1.3
File Interpreter ABI Platform Actions
sis_extras-0.1.3-py3-none-any.whl Python 3 none any Details for sis_extras-0.1.3-py3-none-any.whl

Total release size: 15.1 kB

Release files / sis_extras-0.1.3.tar.gz

Download URL sis_extras-0.1.3.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e7e1892ab5eef36e38880dc9b636597dce83162df4d51f3f7f509a7e792e8a73
BLAKE2b-256 checksum
How to use checksums
cafe22dbfb8813c76412f7a3db2d2c31b5d547c253c82ba08e6870149483d5c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.15.3 CPython/3.10.12 Linux/6.5.0-1021-azure

Release files / sis_extras-0.1.3-py3-none-any.whl

Download URL sis_extras-0.1.3-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f331b325ed9d7fff1449817a89351018c037aee7975893e190f675872908c22
BLAKE2b-256 checksum
How to use checksums
448fe6237bae566eb040e5045a745f098ed1a14be40d86f41fc065860339a5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.15.3 CPython/3.10.12 Linux/6.5.0-1021-azure

Security for sis-extras 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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