Metadata-Version: 2.1
Name: snowflake-ai
Version: 0.5.3
Summary: A Snowflake centic Enterprise AI/ML framework with tight integration of popular data science libraries
Home-page: https://github.com/illuminairy-ai/snowflake-ai#readme
License: Apache Software License 2
Keywords: Snowflake,Enterprise,AI/ML,AI,ML,Machine Learning,Illuminairy
Author: Illuminairy AI
Author-email: tony.liu@yahoo.com
Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.11.*
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: altair (>=4.0.0,<4.1.0)
Requires-Dist: cryptography (>=40.0.2,<42)
Requires-Dist: importlib-resources (>=5.2.0,<=5.12.0)
Requires-Dist: mpmath (>=1.2.1,<1.3.0)
Requires-Dist: pandas (>=1.5.3,<1.6.0)
Requires-Dist: psutil (>=5.9.0,<5.10.0)
Requires-Dist: pyjwt (>=2.7.0,<2.8.0)
Requires-Dist: requests (>=2.28.1,<=2.31.0)
Requires-Dist: scikit-learn (>=1.2.2,<1.3.0)
Requires-Dist: snowflake-connector-python[pandas] (>=3.1.0)
Requires-Dist: snowflake-snowpark-python (>=1.5.0)
Requires-Dist: streamlit (>=1.18.0,<1.19.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: urllib3 (>=1.26.15,<1.27.0)
Description-Content-Type: text/markdown

[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3810/)
[![PyPI downloads month](https://img.shields.io/pypi/dm/snowflake-ai.svg)](https://pypi.python.org/pypi/snowflake-ai/)

Snowflake-AI
=======

*Snowflake_AI* is a Snowflake-centric **Enterprise AI/ML** framework with the tight integration of popular Python data science libraries, e.g., *Pandas*, *Scikit-Learn*, *Pytorch*, *MLFlow*, *Tensorflow*, etc. This project simplifies the process of integrating your company's Snowflake data securely with those popular libraries, making it easier to develop *Snowflake AI* applications leveraging *Snowpark* and other Snowflake ML capabilities to deploy machine learning models in the production environment following the standard MLOps process and enterprise security and governance. Currently, this framework supports OAuth (Authorization Code flow, Device Code flow, Client Credentials flow, etc.) and SAML SSO Snowflake Connection, Streamlit and Notebook Apps development framework, build-in light-weigth MLOps pipelines and initial *Snowpandas* feature engineering APIs.


Installation
------

Use pip to install:

```bash
pip install snowflake-ai
```

or, use Poetry to install:

```bash
poetry add snowflake-ai
```


Configuration
-------

Copy the sample configuration file from the {installed lib dir}/snowflake_ai/conf directory and update the Snowflake connection parameters.

For example, you may do the following to find out where is the {installed lib dir}:

```bash
pip show snowflake-ai
```

While you are in {installed lib dir}, you may do:

```bash
mkdir -p ~/.snowflake_ai/conf
cp snowflake_ai/conf/app_config.toml ~/.snowflake_ai/conf/
```

Then, edit snowflake_ai/conf/app_config.toml with your Snowflake connection details.
Please consult your system admins for your company specific OAuth setup (Note: Azure AD has been fully tested).


Usage
------

To get started with Snowflake-AI, import StreamlitApp and DataFrameFactory from the library:

```python
from snowflake_ai.common import DataFrameFactory as DFF
from snowflake_ai.apps import StreamlitApp

```

Create a SnowConnect instance:

```python
app = StreamlitApp("streamlit_group.app_1")
connect = app.get_default_snow_connect()

```

Specify the table/view or sql you want to work with and create a DataFrame:

```python
tbl_nm = 'SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER'
sdf = DFF.create_df(tbl_nm, connect)
```

Display the contents of the DataFrame:

```python
sdf.show()
```

Currently, in addition to Streamlit app support, Jupyter notebook, Console app, and Base App are supported.

From here, you can use Snowflake-AI to preprocess and manipulate your data using additional Snowpark API, Pandas and Scikit-Learn, Pytorch, etc. to train machine learning models, and perform predictions. Stay tuned, as there are many features in the pipelines waiting to be released.

Enjoy building your next AI/ML project with Snowflake-AI!



Contribution & Development
------

We are always actively seeking contributors to help enhance our open-source project! Whether you're interested in coding, designing, or testing and documentation, your participation can make a valuable difference. Join us in shaping the future of this project and be part of a collaborative community.

It is recommended that you have *Poetry* installed on your system as it would simplify dependence management and code releases. You can install *Poetry* by following the instructions [here](https://python-poetry.org/docs/).

Next, clone [*this*](https://github.com/illuminairy-ai/snowflake-ai.git) repository and navigate to the project directory (assume you are in bash terminal):

```bash
git clone https://github.com/illuminairy-ai/snowflake-ai.git
cd snowflake-ai
```

Then, use Poetry to install all dependencies:

```bash
poetry install
```


License
------

This project is licensed under the Apache 2.0 License - see the [LICENSE](https://github.com/illuminairy-ai/snowflake-ai/blob/master/LICENSE.txt) file for details.

