llama-index readers firestore integration
Project description
Firestore Loader
This loader loads from a Firestore collection or a specific document from Firestore. The loader assumes your project already has the google cloud credentials loaded. To find out how to set up credentials, see here.
Usage
To initialize the loader, provide the project-id of the google cloud project.
Initializing the reader
from llama_index import download_loader
FirestoreReader = download_loader("FirestoreReader")
reader = FirestoreReader(project_id="<Your Project ID>")
Loading Data from a Firestore Collection
Load data from a Firestore collection with the load_data method: The collection path should include all previous documents and collections if it is a nested collection.
documents = reader.load_data(collection="foo/bar/abc/")
Loading a Single Document from Firestore
Load a single document from Firestore with the load_document method:
document = reader.load_document(document_url="foo/bar/abc/MY_DOCUMENT")
Note: load_data returns a list of Document objects, whereas load_document returns a single Document object.
This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent. See here for examples.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for llama_index_readers_firestore-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8062be387bc9b1d2bf09626954b8125eeaab996b5b19b5532d3df972ebec6ee7 |
|
MD5 | fe444bcf48b7eba350feb4e786852d23 |
|
BLAKE2b-256 | a9ac59aeb95ad11d6ee79b54a5d4d4ff69021a847be402018c02ea1308f52c52 |
Hashes for llama_index_readers_firestore-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c96fc2c4f65265c8f62a2060911864cf3c508045650b531714bcb1c07e9ad808 |
|
MD5 | b9e3935335b6db06c502197da5ab3a22 |
|
BLAKE2b-256 | aa61a7b3bdd27d10aba93617ad69e25eb2b508f9aa44ee6e9d49313550585eea |