yipao


Nameyipao JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummaryYipao is a library enabling AI-driven interactions with SQL databases, facilitating dynamic SQL query generation and execution.
upload_time2024-05-31 04:50:35
maintainerNone
docs_urlNone
authorNone
requires_python>=3
licenseMIT License
keywords ai database dynamic execution generation query rag sql
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="center">
  <img src="https://github.com/facil-pos/yipao/blob/main/docs/source/_static/logo.png?raw=true" alt="Yipao Logo" width="200"/>
</div>


Yipao is a cutting-edge Python library that enables AI-driven interactions with SQL databases. It specializes in facilitating dynamic SQL query generation and execution, particularly for large databases with numerous tables. Integrated with ChromaDB, Google Generative AI, Vertex AI, and Qdrant, Yipao is a powerful tool for developers looking to leverage machine learning models and vector storage solutions.

## Why Yipao? 🤔

Yipao is designed to simplify complex SQL query operations and enhance the interaction between large-scale database systems and AI technologies. It allows developers to:
- Generate and execute SQL queries dynamically using natural language.
- Integrate seamlessly with leading AI platforms and vector databases.
- Improve database querying efficiency and accuracy through AI-driven insights.

## Installation 🛠️

To install Yipao, you can use pip:

```bash
pip install yipao
```

## Quick Start  🚀

Here's a quick example to get you started with **Yipao**:

```python
import os
from dotenv import load_dotenv
load_dotenv()

import yipao as yp
from yipao.databases import MySql
from yipao.vectorstores import QdrantDB
from yipao.LLM import GoogleGenAi

connection = {
    'host': os.getenv('HOST'),
    'user': os.getenv('USERDB'),
    'password': os.getenv('PASSWORD'),
    'database': os.getenv('DATABASE'),
    'port': int(os.getenv('PORT'))
}

mysql = MySql(**connection)

qdrant =  QdrantDB(':memory:')

gemini = GoogleGenAi(model='gemini-pro', api_key=os.getenv('APIKEYGEMINI'))

agent = yp.Agent(llm=gemini, 
                 database=mysql, 
                 vectorstore=qdrant)

agent.document_database()

prompt = f"What is my best selling product?"

res = agent.invoke(prompt)

print(res)
# your best products are...
```

# Contributing 👋

Want to help improve Yipao? Contributions are welcome! 🎉

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yipao",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "ai, database, dynamic, execution, generation, query, rag, sql",
    "author": null,
    "author_email": "factral <nelsonfabiancs8@gmail.com>, Daniel <manosalvasierra@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/82/555ee743e78d56938e7ad646fe9cf91b84ba205162d62dc17ec22669bade/yipao-0.0.4.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\">\n  <img src=\"https://github.com/facil-pos/yipao/blob/main/docs/source/_static/logo.png?raw=true\" alt=\"Yipao Logo\" width=\"200\"/>\n</div>\n\n\nYipao is a cutting-edge Python library that enables AI-driven interactions with SQL databases. It specializes in facilitating dynamic SQL query generation and execution, particularly for large databases with numerous tables. Integrated with ChromaDB, Google Generative AI, Vertex AI, and Qdrant, Yipao is a powerful tool for developers looking to leverage machine learning models and vector storage solutions.\n\n## Why Yipao? \ud83e\udd14\n\nYipao is designed to simplify complex SQL query operations and enhance the interaction between large-scale database systems and AI technologies. It allows developers to:\n- Generate and execute SQL queries dynamically using natural language.\n- Integrate seamlessly with leading AI platforms and vector databases.\n- Improve database querying efficiency and accuracy through AI-driven insights.\n\n## Installation \ud83d\udee0\ufe0f\n\nTo install Yipao, you can use pip:\n\n```bash\npip install yipao\n```\n\n## Quick Start  \ud83d\ude80\n\nHere's a quick example to get you started with **Yipao**:\n\n```python\nimport os\nfrom dotenv import load_dotenv\nload_dotenv()\n\nimport yipao as yp\nfrom yipao.databases import MySql\nfrom yipao.vectorstores import QdrantDB\nfrom yipao.LLM import GoogleGenAi\n\nconnection = {\n    'host': os.getenv('HOST'),\n    'user': os.getenv('USERDB'),\n    'password': os.getenv('PASSWORD'),\n    'database': os.getenv('DATABASE'),\n    'port': int(os.getenv('PORT'))\n}\n\nmysql = MySql(**connection)\n\nqdrant =  QdrantDB(':memory:')\n\ngemini = GoogleGenAi(model='gemini-pro', api_key=os.getenv('APIKEYGEMINI'))\n\nagent = yp.Agent(llm=gemini, \n                 database=mysql, \n                 vectorstore=qdrant)\n\nagent.document_database()\n\nprompt = f\"What is my best selling product?\"\n\nres = agent.invoke(prompt)\n\nprint(res)\n# your best products are...\n```\n\n# Contributing \ud83d\udc4b\n\nWant to help improve Yipao? Contributions are welcome! \ud83c\udf89\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Yipao is a library enabling AI-driven interactions with SQL databases, facilitating dynamic SQL query generation and execution.",
    "version": "0.0.4",
    "project_urls": {
        "Development": "https://github.com/facil-pos/yipao",
        "Homepage": "https://facil-pos.github.io/yipao/"
    },
    "split_keywords": [
        "ai",
        " database",
        " dynamic",
        " execution",
        " generation",
        " query",
        " rag",
        " sql"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ae215c86e923c16af942f54e8b678da54069fe39883b0a07055b6d827143ebd0",
                "md5": "095cfe9a509422b4d532ba6c2e0c2668",
                "sha256": "c123773be73aaf1cdd96f7f509b4b52328cd0486688a4e45838c165a7f62c8fb"
            },
            "downloads": -1,
            "filename": "yipao-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "095cfe9a509422b4d532ba6c2e0c2668",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 16518,
            "upload_time": "2024-05-31T04:50:33",
            "upload_time_iso_8601": "2024-05-31T04:50:33.373934Z",
            "url": "https://files.pythonhosted.org/packages/ae/21/5c86e923c16af942f54e8b678da54069fe39883b0a07055b6d827143ebd0/yipao-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa82555ee743e78d56938e7ad646fe9cf91b84ba205162d62dc17ec22669bade",
                "md5": "503914a401afd8fbcd2a5b18a7e8e128",
                "sha256": "b991c77cce78615bb07c85866bc16d0b556b880d972479d88d80c42b969c63a7"
            },
            "downloads": -1,
            "filename": "yipao-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "503914a401afd8fbcd2a5b18a7e8e128",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 10825,
            "upload_time": "2024-05-31T04:50:35",
            "upload_time_iso_8601": "2024-05-31T04:50:35.122850Z",
            "url": "https://files.pythonhosted.org/packages/aa/82/555ee743e78d56938e7ad646fe9cf91b84ba205162d62dc17ec22669bade/yipao-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-31 04:50:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "facil-pos",
    "github_project": "yipao",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "yipao"
}
        
Elapsed time: 0.24186s