SnowDev - Snowpark Devops
SnowDev is a command-line utility designed for deploying various components related to Snowflake such as UDFs, stored procedures, and Streamlit applications using Snowpark. This tool streamlines tasks like initializing directories, local testing, uploading, and auto create components code using AI.
Features
SnowDev currently supports the following components:
- UDF (User-Defined Function)
- Stored Procedure
- Streamlit
- Tasks
Setup
pyenv install 3.10.0
pyenv local 3.10.0
pip install snowdev or poetry add snowdev
snowdev init
Usage
snowdev <command> [options]
Commands
init
- Description: Initializes the directory structure for the deployment.
- Usage:
snowdev init
test
- Description: Test the deployment locally.
- Usage:
snowdev test --udf predict_sentiment
deploy
- Description: Deploys the specified components, registers and tests using temp function before deploying to prod
- Usage:
snowdev deploy --udf predict_sentiment
upload
- Description: Uploads specified items such as static content.
- Usage:
snowdev upload --upload <upload_item>
add
- Description: Adds a package and optionally uploads it to stage.
- Usage:
snowdev add --package <package_name>
new
- Description: Adds a new component.
- Usage:
snowdev new --sproc "test_script"
ai
- Description: Interact with AI components and embeddings. It can also help in creating new AI components code based on the description,
make sure to have executed
snowdev ai --embedto generate embeddings. - Usage:
snowdev ai --streamlit "Want to see a bar chart on the order table"
Options
--udf <udf_name>: Name or identifier for the UDF you want to deploy.--sproc <sproc_name>: Name or identifier for the Stored Procedure you want to deploy.--streamlit <streamlit_name>: Name or identifier for the Streamlit application you want to deploy. (This is still in PrPr)--task <task_name>: Name of the snowflake task you want to deploy.--upload <upload_item>: Specifies what to upload. Currently supported options:static.--package <package_name>: Specifies the name of the package to zip and upload to the static folder.--embed: Used with theaicommand to run embeddings.
Requirements
- Python:
>=3.10.0, <3.11.0 - Dependencies:
"snowflake-snowpark-python" = { version = "1.5.1", extras = ["pandas"] }
Notes
- For the
aicommand, when specifying a component type (using --udf, --sproc, or --streamlit), ensure that the respective name or identifier is provided. - When using the
addcommand, the user will be prompted to decide if they want to upload the zip package to stage. - The AI functionality in SnowDev is optimized with GPT-4, ensuring a better relevance in code suggestions and interactions.
Roadmap
- Support for UDFs and Stored Procedures
- Support for Streamlit
- AI interactions for embedding and suggestions
- Support for snowflake Tasks
- AI to add the packages to toml file
- Support for multiple python scripts in stored procedures
- Use AI to modify existing code for optimization
- Adding more granularity for AI commands
Contributions
Feel free to contribute to SnowDev by submitting pull requests or opening issues on the project's GitHub repository.
Metadata
Release files for snowdev 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snowdev-0.2.0.tar.gz | 34.8 kB | Without provenance | Details for snowdev-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snowdev-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for snowdev-0.2.0-py3-none-any.whl |
Total release size: 79.6 kB
Release files / snowdev-0.2.0.tar.gz
| Download URL | snowdev-0.2.0.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fb689ef688e803a81d6a5bf2e81fef24c07120449f4968903a52376a0dbdde5
|
|
BLAKE2b-256 checksum How to use checksums |
6d223d1e8e8346530e089066fe97ccf68eb106abf9b4807dfcbf7e47316a58fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-1011-azure
|
Release files / snowdev-0.2.0-py3-none-any.whl
| Download URL | snowdev-0.2.0-py3-none-any.whl |
|---|---|
| Size | 44.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11b9a418e7d3c502e51d0e434b85f277b46f8cfde9fb3522293607a69f4748d0
|
|
BLAKE2b-256 checksum How to use checksums |
93626237a4ed0ab4e829462fdf7a7a146edaed1c5dd6ab26d1ca040c80b0c186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-1011-azure
|
Security for snowdev 0.2.0
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.