Skip to main content

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

llama_index_readers_firestore-0.2.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_readers_firestore-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_firestore-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f7990e1db5434f31874c7fbeceec72f072566dddae524c0be9f157ceebfdaf56
MD5 d28789241b90a540e46fe99fc3f94fa5
BLAKE2b-256 3e4e38708f99d1f584900a3541239f6cec77d2ae56fe177e3fe31d3507a840dd

See more details on using hashes here.

File details

Details for the file llama_index_readers_firestore-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_firestore-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55ae69bb0da131d0842e0ab2473051e80ec52c5735b85497b7d42d4462ef9fc5
MD5 18e7a8a79a4cd3eb148fe50fabdcb80d
BLAKE2b-256 64676c6fcb41d1961ab93288ddb933ff50e36d4e43685076837844b3b22d88a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page