diff --git a/functions/concepts/main.py b/functions/concepts/main.py index 9e1f8bf28433..f6cf5a080532 100644 --- a/functions/concepts/main.py +++ b/functions/concepts/main.py @@ -26,11 +26,11 @@ def statelessness(request): within a specific instance. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ global count count += 1 @@ -62,11 +62,11 @@ def scope_demo(request): HTTP Cloud Function that declares a variable. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ # Per-function scope @@ -82,11 +82,11 @@ def make_request(request): HTTP Cloud Function that makes another HTTP request. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ import requests diff --git a/functions/helloworld/main.py b/functions/helloworld/main.py index c2c20d6c7ed5..dba338efc944 100644 --- a/functions/helloworld/main.py +++ b/functions/helloworld/main.py @@ -28,11 +28,11 @@ def hello_get(request): """HTTP Cloud Function. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ return 'Hello, World!' # [END functions_helloworld_get] @@ -60,11 +60,11 @@ def hello_http(request): """HTTP Cloud Function. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ request_json = request.get_json() if request_json and 'name' in request_json: @@ -111,11 +111,11 @@ def hello_content(request): according to the "content-type" header. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ content_type = request.headers['content-type'] if content_type == 'application/json': @@ -137,11 +137,11 @@ def hello_method(request): """ Responds to a GET request with "Hello world!". Forbids a PUT request. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ from flask import abort diff --git a/functions/http/main.py b/functions/http/main.py index 25d1c7c03d1b..8d345a0eab99 100644 --- a/functions/http/main.py +++ b/functions/http/main.py @@ -48,7 +48,7 @@ def parse_xml(request): Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ data = xmltodict.parse(request.data) return json.dumps(data, indent=2) @@ -72,7 +72,7 @@ def parse_multipart(request): Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ # This code will process each non-file field in the form diff --git a/functions/log/main.py b/functions/log/main.py index 41323e6ba8fb..2a2c35025de7 100644 --- a/functions/log/main.py +++ b/functions/log/main.py @@ -58,7 +58,7 @@ def get_log_entries(request): Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ """""" diff --git a/functions/tips/main.py b/functions/tips/main.py index 4fd60813b735..fca738c59e7d 100644 --- a/functions/tips/main.py +++ b/functions/tips/main.py @@ -63,11 +63,11 @@ def lazy_globals(request): HTTP Cloud Function that uses lazily-initialized globals. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ global lazy_global, non_lazy_global @@ -89,11 +89,11 @@ def connection_pooling(request): HTTP Cloud Function that uses a connection pool to make HTTP requests. Args: request (flask.Request): The request object. - + Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ # The URL to send the request to @@ -121,7 +121,7 @@ def gcp_api_call(request): Returns: The response text, or any set of values that can be turned into a Response object using `make_response` - . + . """ project = os.getenv('GCP_PROJECT')