Skip to content

Commit

Permalink
chore(functions/concepts-stateless): Update sample to use declarative…
Browse files Browse the repository at this point in the history
… signature (#9040)

Co-authored-by: Charles Engelke <engelke@google.com>
  • Loading branch information
2 people authored and telpirion committed Mar 13, 2023
1 parent 94b9ce4 commit ffd1222
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/concepts-stateless/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import time
# [START functions_concepts_stateless]
import functions_framework


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


@functions_framework.http
def statelessness(request):
"""
HTTP Cloud Function that counts how many times it is executed
Expand Down
1 change: 1 addition & 0 deletions functions/concepts-stateless/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
flask==2.1.0
pytest==7.0.1
functions-framework==3.3.0
1 change: 1 addition & 0 deletions functions/concepts-stateless/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
functions-framework==3.3.0

0 comments on commit ffd1222

Please sign in to comment.