From c8e72681c07acd8f3ed1464b355d8f926e0cddc7 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Mon, 13 Nov 2023 07:37:20 +0530 Subject: [PATCH] sample classification --- .../python/functions/sample_classification.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cloud-functions/python/functions/sample_classification.py diff --git a/cloud-functions/python/functions/sample_classification.py b/cloud-functions/python/functions/sample_classification.py new file mode 100644 index 0000000..84aed14 --- /dev/null +++ b/cloud-functions/python/functions/sample_classification.py @@ -0,0 +1,11 @@ +def sample_classification(event, context): + """Triggered by a change to a Firestore document. + Args: + event (dict): Event payload. + context (google.cloud.functions.Context): Metadata for the event. + """ + resource_string = context.resource + # print out the resource string that triggered the function + print(f"Function triggered by change to: {resource_string}.") + # now print out the entire event object + print(str(event))