Almaatla commited on
Commit
35dc49b
1 Parent(s): 2be23e6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, jsonify, request
2
+
3
+ app = Flask(__name__)
4
+
5
+ @app.route('/')
6
+ def hello():
7
+ name = request.args.get('name', '')
8
+ if name:
9
+ message = f'Hello, {name}!'
10
+ else:
11
+ message = 'Hello!'
12
+ return jsonify(message=message)
13
+
14
+ if __name__ == '__main__':
15
+ app.run()