From 60a3bb956dc493d531534c08c2c78c1d3de1a61a Mon Sep 17 00:00:00 2001 From: Regev Golan Date: Wed, 20 Nov 2024 00:19:31 +0200 Subject: [PATCH] Update flask and add greet_user api --- .tool-versions | 2 +- app/app.py | 6 ++++++ requirements.txt | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 5d997303..a79d3526 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -python 3.7.4 +python 3.12.7 diff --git a/app/app.py b/app/app.py index 02bf7050..05c04a49 100644 --- a/app/app.py +++ b/app/app.py @@ -19,6 +19,12 @@ def health(): return {"is_healthy": True} +@app.route("/user/") +def greet_user(user_id): + return f"hello {user_id}" + + if __name__ == "__main__": app.run(host='0.0.0.0', port=8080) print("Service is shutting down..") + diff --git a/requirements.txt b/requirements.txt index a388a54b..a36945b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -flask==1.1.1 +flask==3.1.0 pip>=19.2.3