Module for Cloud Functions that are triggered by the Firebase Realtime Database.
Classes
Eventclass firebase_functions.db_fn.Event(specversion: str, id: str, source: str, type: str, time: datetime, data: T, subject: str | None, firebase_database_host: str, instance: str, reference: str, location: str, params: dict[str, str]) |
---|
Bases: A CloudEvent that contains a DataSnapshot or a Change<DataSnapshot>.
|
Functions
on_value_createdfirebase_functions.db_fn.on_value_created(**kwargs) Callable[[Callable[[Event[Any | None]], None]], Callable[[Event[Any | None]], None]] |
---|
Event handler that triggers when data is created in Realtime Database. Example: @on_value_created(reference="*") def example(event: Event[object]): pass
|
on_value_deletedfirebase_functions.db_fn.on_value_deleted(**kwargs) Callable[[Callable[[Event[Any | None]], None]], Callable[[Event[Any | None]], None]] |
---|
Event handler that triggers when data is deleted in Realtime Database. Example: @on_value_deleted(reference="*") def example(event: Event[object]) -> None: pass
|
on_value_updatedfirebase_functions.db_fn.on_value_updated(**kwargs) Callable[[Callable[[Event[Change[Any | None]]], None]], Callable[[Event[Change[Any | None]]], None]] |
---|
Event handler that triggers when data is updated in Realtime Database. Example: @on_value_updated(reference="*") def example(event: Event[Change[object]]) -> None: pass
|
on_value_writtenfirebase_functions.db_fn.on_value_written(**kwargs) Callable[[Callable[[Event[Change[Any | None]]], None]], Callable[[Event[Change[Any | None]]], None]] |
---|
Event handler that triggers when data is created, updated, or deleted in Realtime Database. Example: @on_value_written(reference="*") def example(event: Event[Change[object]]) -> None: pass
|