Module bundle (2.4.0)

Classes for representing bundles for the Google Cloud Firestore API.

Classes

FirestoreBundle

FirestoreBundle(name: str)

A group of serialized documents and queries, suitable for longterm storage or query resumption.

If any queries are added to this bundle, all associated documents will be loaded and stored in memory for serialization.

Usage:

from google.cloud.firestore import Client, _helpers
from google.cloud.firestore_bundle import FirestoreBundle

db = Client()
bundle = FirestoreBundle('my-bundle')
bundle.add_named_query('all-users', db.collection('users')._query())
bundle.add_named_query(
    'top-ten-hamburgers',
    db.collection('hamburgers').limit(limit=10),
)
serialized: str = bundle.build()

# Store somewhere like a Google Cloud Storage bucket for retrieval by
# a client SDK.
Parameter
NameDescription
name str

The Id of the bundle.