https://github.com/kaarthik108/snowdev
snowdev: A DevOps toolkit for streamlined Snowflake deployments via Snowpark
https://github.com/kaarthik108/snowdev
ai devops llm snowflake snowpark
Last synced: about 1 month ago
JSON representation
snowdev: A DevOps toolkit for streamlined Snowflake deployments via Snowpark
- Host: GitHub
- URL: https://github.com/kaarthik108/snowdev
- Owner: kaarthik108
- Created: 2023-08-12T21:38:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-24T05:39:59.000Z (over 1 year ago)
- Last Synced: 2025-03-24T18:13:06.156Z (about 2 months ago)
- Topics: ai, devops, llm, snowflake, snowpark
- Language: Python
- Homepage:
- Size: 5.84 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SnowDev - Snowpark Devops
[](docs/quickstart.md) [](https://pepy.tech/project/snowdev)
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
```bash
pyenv install 3.10.0
pyenv local 3.10.0
pip install snowdev or poetry add snowdev
snowdev init
```## Usage
``` bash
snowdev [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 `### `add`
- **Description**: Adds a package and optionally uploads it to stage.
- **Usage**: `snowdev add --package `### `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 --embed` to generate embeddings.
- **Usage**: `snowdev ai --streamlit "Want to see a bar chart on the order table"`## Options
- `--udf `: Name or identifier for the UDF you want to deploy.
- `--sproc `: Name or identifier for the Stored Procedure you want to deploy.
- `--streamlit `: Name or identifier for the Streamlit application you want to deploy. (This is still in PrPr)
- `--task `: Name of the snowflake task you want to deploy.
- `--upload `: Specifies what to upload. Currently supported options: `static`.
- `--package `: Specifies the name of the package to zip and upload to the static folder.
- `--embed`: Used with the `ai` command to run embeddings.## Requirements
- **Python**: `>=3.10.0, <3.11.0`
- **Dependencies**:
- `"snowflake-snowpark-python" = { version = "1.5.1", extras = ["pandas"] }`## Notes
- For the `ai` command, when specifying a component type (using --udf, --sproc, or --streamlit), ensure that the respective name or identifier is provided.
- When using the `add` command, 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
- [x] Support for UDFs and Stored Procedures
- [x] Support for Streamlit
- [x] AI interactions for embedding and suggestions
- [x] Support for snowflake Tasks
- [x] 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.