We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 414d66f commit b7d0d14Copy full SHA for b7d0d14
functions/tips-gcp-apis/main.py
@@ -16,13 +16,15 @@
16
# [START functions_tips_gcp_apis]
17
import os
18
19
+import functions_framework
20
from google.cloud import pubsub_v1
21
22
23
# Create a global Pub/Sub client to avoid unneeded network activity
24
pubsub = pubsub_v1.PublisherClient()
25
26
27
+@functions_framework.http
28
def gcp_api_call(request):
29
"""
30
HTTP Cloud Function that uses a cached client library instance to
functions/tips-gcp-apis/requirements.txt
@@ -1 +1,2 @@
1
google-cloud-pubsub==2.9.0
2
+functions-framework==3.2.1
0 commit comments