Name | llama-index-readers-mongodb JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | llama-index readers mongodb integration |
upload_time | 2024-08-22 06:39:53 |
maintainer | jerryjliu |
docs_url | None |
author | Your Name |
requires_python | <4.0,>=3.8.1 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LlamaIndex Readers Integration: Mongo
## Overview
Simple Mongo Reader allows loading data from a MongoDB database. It concatenates specified fields from each document into a single document used by LlamaIndex.
### Installation
You can install MongoDB Reader via pip:
```bash
pip install llama-index-readers-mongodb
```
### Usage
```python
from llama_index.readers.mongo import SimpleMongoReader
# Initialize SimpleMongoReader
reader = SimpleMongoReader(
host="<Mongo Host>", # Mongo host address
port=27017, # Mongo port (default: 27017)
uri="<Mongo Connection String>", # Provide the URI if not using host and port
)
# Lazy load data from MongoDB
documents = reader.lazy_load_data(
db_name="<Database Name>", # Name of the database
collection_name="<Collection Name>", # Name of the collection
field_names=[
"text"
], # Names of the fields to concatenate (default: ["text"])
separator="", # Separator between fields (default: "")
query_dict=None, # Query to filter documents (default: None)
max_docs=0, # Maximum number of documents to load (default: 0)
metadata_names=None, # Names of the fields to add to metadata attribute (default: None)
)
```
Implementation for MongoDB reader can be found [here](https://docs.llamaindex.ai/en/stable/examples/data_connectors/MongoDemo/)
This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently
used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-readers-mongodb",
"maintainer": "jerryjliu",
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/87/3e/5f7c427e9bacb2bfaabd877b68f1194c11f031fdaf505183a8c55c3a5a6e/llama_index_readers_mongodb-0.2.0.tar.gz",
"platform": null,
"description": "# LlamaIndex Readers Integration: Mongo\n\n## Overview\n\nSimple Mongo Reader allows loading data from a MongoDB database. It concatenates specified fields from each document into a single document used by LlamaIndex.\n\n### Installation\n\nYou can install MongoDB Reader via pip:\n\n```bash\npip install llama-index-readers-mongodb\n```\n\n### Usage\n\n```python\nfrom llama_index.readers.mongo import SimpleMongoReader\n\n# Initialize SimpleMongoReader\nreader = SimpleMongoReader(\n host=\"<Mongo Host>\", # Mongo host address\n port=27017, # Mongo port (default: 27017)\n uri=\"<Mongo Connection String>\", # Provide the URI if not using host and port\n)\n\n# Lazy load data from MongoDB\ndocuments = reader.lazy_load_data(\n db_name=\"<Database Name>\", # Name of the database\n collection_name=\"<Collection Name>\", # Name of the collection\n field_names=[\n \"text\"\n ], # Names of the fields to concatenate (default: [\"text\"])\n separator=\"\", # Separator between fields (default: \"\")\n query_dict=None, # Query to filter documents (default: None)\n max_docs=0, # Maximum number of documents to load (default: 0)\n metadata_names=None, # Names of the fields to add to metadata attribute (default: None)\n)\n```\n\nImplementation for MongoDB reader can be found [here](https://docs.llamaindex.ai/en/stable/examples/data_connectors/MongoDemo/)\n\nThis loader is designed to be used as a way to load data into\n[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently\nused as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index readers mongodb integration",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5bd9472325bd27c63a7b66ac35ce27ee2fa3aefd718aecfd9c49928130d7ea6c",
"md5": "6679979ed6b164ff24af50c0e91c95a9",
"sha256": "2292302279536f1ff39a1efabe2701381b6c81e7272eab3a13320c1ef3513ac3"
},
"downloads": -1,
"filename": "llama_index_readers_mongodb-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6679979ed6b164ff24af50c0e91c95a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 3563,
"upload_time": "2024-08-22T06:39:52",
"upload_time_iso_8601": "2024-08-22T06:39:52.334962Z",
"url": "https://files.pythonhosted.org/packages/5b/d9/472325bd27c63a7b66ac35ce27ee2fa3aefd718aecfd9c49928130d7ea6c/llama_index_readers_mongodb-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "873e5f7c427e9bacb2bfaabd877b68f1194c11f031fdaf505183a8c55c3a5a6e",
"md5": "11371d501465483d71fc39cd84abeaae",
"sha256": "f25aa3ffcb92af20539bf22cb451c76c058e9a3d304a4a0f339cc24051e6a434"
},
"downloads": -1,
"filename": "llama_index_readers_mongodb-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "11371d501465483d71fc39cd84abeaae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 3272,
"upload_time": "2024-08-22T06:39:53",
"upload_time_iso_8601": "2024-08-22T06:39:53.464362Z",
"url": "https://files.pythonhosted.org/packages/87/3e/5f7c427e9bacb2bfaabd877b68f1194c11f031fdaf505183a8c55c3a5a6e/llama_index_readers_mongodb-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 06:39:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-mongodb"
}