firestore-batch
A Python context manager for easy Google Forestore batched writes.
What it does for you
- Creates a new batch on entering.
- Takes care of the 500-operation limit. When the limit is hit, it commits accumulated operations to the database and creates a new batch.
- Commits all operations on exit.
Usage
Install with pip:
pip install firestore-batch
Use in your code:
# Initialize the app
from firebase_admin import initialize_app, firestore
initialize_app()
db = firestore.client()
# Make lots of batched writes
from firestore_batch import Batch
with Batch(db) as batch:
for i in range(1000):
batch.set(doc_ref, {f'property_{i}': f'value_{i}'})
Methods
set(),update(),delete()- as in the originalWriteBatchclass (see the documentation with usage examples and API Reference for theWriteBatchandDocumentReferenceclasses).
Metadata
Release files for firestore-batch 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| firestore_batch-0.0.1.tar.gz | 2.1 kB | Without provenance | Details for firestore_batch-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| firestore_batch-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for firestore_batch-0.0.1-py3-none-any.whl |
Total release size: 5.1 kB
Release files / firestore_batch-0.0.1.tar.gz
| Download URL | firestore_batch-0.0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb1908c9f5d5cce87366c27ae09e7f6e9e8bf0b27b9b07a778b9828b895b5ad4
|
|
BLAKE2b-256 checksum How to use checksums |
a2da008c5873d1cfb72516e56a68290164164f78e23e74230d72903f72309820
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Release files / firestore_batch-0.0.1-py3-none-any.whl
| Download URL | firestore_batch-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ba8323a9947147587e9ca07ca97bf610261301c2f0f0aa6e9bada60cd007031
|
|
BLAKE2b-256 checksum How to use checksums |
fb404426819cb502847fdea2801fc75e0c3312ec3d0d0ecebde935ba2276cfc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Security for firestore-batch 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.