Module for Cloud Functions that are triggered by Firestore.
Classes
Eventclass firebase_functions.firestore_fn.Event(specversion: str, id: str, source: str, type: str, time: datetime, data: T, subject: str | None, location: str, project: str, database: str, namespace: str, document: str, params: dict[str, str]) |
---|
Bases: A CloudEvent that contains a
|
Functions
on_document_createdfirebase_functions.firestore_fn.on_document_created(**kwargs) Callable[[Callable[[Event[DocumentSnapshot | None]], None]], Callable[[Event[DocumentSnapshot | None]], None]] |
---|
Event handler that triggers when a document is created in Firestore. Example: @on_document_created(document="*")
def example(event: Event[DocumentSnapshot]):
pass
|
on_document_deletedfirebase_functions.firestore_fn.on_document_deleted(**kwargs) Callable[[Callable[[Event[DocumentSnapshot | None]], None]], Callable[[Event[DocumentSnapshot | None]], None]] |
---|
Event handler that triggers when a document is deleted in Firestore. Example: @on_document_deleted(document="*")
def example(event: Event[DocumentSnapshot]) -> None:
pass
|
on_document_updatedfirebase_functions.firestore_fn.on_document_updated(**kwargs) Callable[[Callable[[Event[Change[DocumentSnapshot | None]]], None]], Callable[[Event[Change[DocumentSnapshot | None]]], None]] |
---|
Event handler that triggers when a document is updated in Firestore. Example: @on_document_updated(document="*")
def example(event: Event[Change[DocumentSnapshot]]) -> None:
pass
|
on_document_writtenfirebase_functions.firestore_fn.on_document_written(**kwargs) Callable[[Callable[[Event[Change[DocumentSnapshot | None]]], None]], Callable[[Event[Change[DocumentSnapshot | None]]], None]] |
---|
Event handler that triggers when a document is created, updated, or deleted in Firestore. Example: @on_document_written(document="*")
def example(event: Event[Change[DocumentSnapshot]]) -> None:
pass
|