Skip to content

Commit 5798d47

Browse files
Kenneth Rosarioengelke
Kenneth Rosario
andauthored
chore(functions/concepts-stateless): Update sample to use declarative signature (#9040)
Co-authored-by: Charles Engelke <[email protected]>
1 parent c80f35f commit 5798d47

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

functions/concepts-stateless/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import time
15+
# [START functions_concepts_stateless]
16+
import functions_framework
1617

1718

18-
# [START functions_concepts_stateless]
1919
# Global variable, modified within the function by using the global keyword.
2020
count = 0
2121

2222

23+
@functions_framework.http
2324
def statelessness(request):
2425
"""
2526
HTTP Cloud Function that counts how many times it is executed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
flask==2.1.0
22
pytest==7.0.1
3+
functions-framework==3.3.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
functions-framework==3.3.0

0 commit comments

Comments
 (0)