llama-index readers firestore integration
Project description
Firestore Loader
pip install llama-index-readers-firestore
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.readers.firestore import 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.
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
File details
Details for the file llama_index_readers_firestore-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_firestore-0.3.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e15263e6fe89b541694f2ed57c0bd05e48e68f22823e795d878684d51cf29ac2 |
|
MD5 | 5807d7f9492e136d505ef0339bc3a716 |
|
BLAKE2b-256 | 8d830fb624d9259419c19e848c0a9a6149733cd990068eeced54db90d788f7ea |
File details
Details for the file llama_index_readers_firestore-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_firestore-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e3ceea61fbcd539a6f400f197c1611c558df69bf095285eab5cc47e2aa55e2 |
|
MD5 | b1e4899b16f9167beeb7f9042a657433 |
|
BLAKE2b-256 | aee0daae983ccc4ccd4f74dce793eafd3f33fd990211a205fab0290f478f8270 |