pylangdb


Namepylangdb JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-08-15 18:31:08
maintainerNone
docs_urlNone
authorVivek
requires_python<4.0,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pylangdb
`pylangdb` is a Python package for interacting with `LangDb` APIs. Please find out more at https://langdb.ai/.

## Installation
To install `pylangdb`, use pip:

```bash
pip install pylangdb
```

## Usage

Initialize `LangDb`

```python
from pylangdb import LangDb, MessageRequest

langdb = LangDb(CLIENT_ID, CLIENT_SECRET)
```

Query
```python
query = "select * from langdb.models"
self.langdb.query_df(query)
```

Execute View
```python
langdb.execute_view({
    "view_name": "view_name", 
    "params": {
        "param_a": ".."
    }
})
```

Invoke Model
```python
msg = MessageRequest(
            model_name='review',
            message='You are a terrible product',
            parameters={},
            include_history=False
        )
response = langdb.invoke_model(msg)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pylangdb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Vivek",
    "author_email": "vivek@langdb.ai",
    "download_url": "https://files.pythonhosted.org/packages/11/6c/6b8209099e26f6de244fcf40b97c0e4f4b980ad76f90670f1d3d0bec4bb5/pylangdb-0.1.1.tar.gz",
    "platform": null,
    "description": "# pylangdb\n`pylangdb` is a Python package for interacting with `LangDb` APIs. Please find out more at https://langdb.ai/.\n\n## Installation\nTo install `pylangdb`, use pip:\n\n```bash\npip install pylangdb\n```\n\n## Usage\n\nInitialize `LangDb`\n\n```python\nfrom pylangdb import LangDb, MessageRequest\n\nlangdb = LangDb(CLIENT_ID, CLIENT_SECRET)\n```\n\nQuery\n```python\nquery = \"select * from langdb.models\"\nself.langdb.query_df(query)\n```\n\nExecute View\n```python\nlangdb.execute_view({\n    \"view_name\": \"view_name\", \n    \"params\": {\n        \"param_a\": \"..\"\n    }\n})\n```\n\nInvoke Model\n```python\nmsg = MessageRequest(\n            model_name='review',\n            message='You are a terrible product',\n            parameters={},\n            include_history=False\n        )\nresponse = langdb.invoke_model(msg)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56b81f33d7c6e5bc93225778b0ad020841293235cb63526947c17552eacc9867",
                "md5": "b25aa4b46bbafdedaa2210079c5b6e6d",
                "sha256": "34dbaf65ad0de81f4691aca873d1c087a7e48f46688c63db4aee30bbbb34fd19"
            },
            "downloads": -1,
            "filename": "pylangdb-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b25aa4b46bbafdedaa2210079c5b6e6d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 4114,
            "upload_time": "2024-08-15T18:31:07",
            "upload_time_iso_8601": "2024-08-15T18:31:07.369211Z",
            "url": "https://files.pythonhosted.org/packages/56/b8/1f33d7c6e5bc93225778b0ad020841293235cb63526947c17552eacc9867/pylangdb-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "116c6b8209099e26f6de244fcf40b97c0e4f4b980ad76f90670f1d3d0bec4bb5",
                "md5": "2a522017d272c91d05a87d8988006de3",
                "sha256": "c5967d1028d5ff861f3648f5c7e82464133e002c682f51719118fa744cc22bc7"
            },
            "downloads": -1,
            "filename": "pylangdb-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2a522017d272c91d05a87d8988006de3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 3458,
            "upload_time": "2024-08-15T18:31:08",
            "upload_time_iso_8601": "2024-08-15T18:31:08.733287Z",
            "url": "https://files.pythonhosted.org/packages/11/6c/6b8209099e26f6de244fcf40b97c0e4f4b980ad76f90670f1d3d0bec4bb5/pylangdb-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-15 18:31:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pylangdb"
}
        
Elapsed time: 0.68279s