KavinduHansaka commited on
Commit
a8fdef3
·
verified ·
1 Parent(s): 5aec378

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -6,6 +6,10 @@ app = Flask(__name__)
6
  API_KEY = "6d0b5a223205f8e88b2b9d45a0ad532a"
7
 
8
  @app.route("/get_weather", methods=["GET"])
 
 
 
 
9
  def get_weather():
10
  city = request.args.get("city")
11
  res = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={API_KEY}&units=metric")
 
6
  API_KEY = "6d0b5a223205f8e88b2b9d45a0ad532a"
7
 
8
  @app.route("/get_weather", methods=["GET"])
9
+ @app.route("/")
10
+ def index():
11
+ return "✅ Weather API is running!"
12
+
13
  def get_weather():
14
  city = request.args.get("city")
15
  res = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={API_KEY}&units=metric")