forked from benwilcock/python-pipenv
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.py
More file actions
31 lines (25 loc) · 789 Bytes
/
app.py
File metadata and controls
31 lines (25 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from flask import Flask, request, render_template, jsonify
import gunicorn
app_name = "Python App With Flask, HTML, And REST"
app = Flask(app_name)
client = "VMware"
framework = "Python with Pipenv"
messages = [
{
'client':client,
'framework':framework,
'msg_subject':'Secure Software Supply Chains Are Great!',
'msg_body':'With A Secure Software Supply Chain, Deploying Python Code To PROD is Safe, Reliable, And Fast!'
}
]
@app.route("/")
def hello():
return render_template('index.html', client=client, framework=framework)
@app.route('/messages')
def get_incomes():
return jsonify(messages)
@app.route('/versions')
def versions():
gu_version = gunicorn.__version__
return "Gunicorn version: " + gu_version
app.debug=False