generated from MLH-Fellowship/orientation-project-python
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
80 lines (65 loc) · 1.63 KB
/
app.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
'''
Flask Application
'''
from flask import Flask, jsonify, request
from models import Experience, Education, Skill
app = Flask(__name__)
data = {
"experience": [
Experience("Software Developer",
"A Cool Company",
"October 2022",
"Present",
"Writing Python Code",
"example-logo.png")
],
"education": [
Education("Computer Science",
"University of Tech",
"September 2019",
"July 2022",
"80%",
"example-logo.png")
],
"skill": [
Skill("Python",
"1-2 Years",
"example-logo.png")
]
}
@app.route('/test')
def hello_world():
'''
Returns a JSON test message
'''
return jsonify({"message": "Hello, World!"})
@app.route('/resume/experience', methods=['GET', 'POST'])
def experience():
'''
Handle experience requests
'''
if request.method == 'GET':
return jsonify()
if request.method == 'POST':
return jsonify({})
return jsonify({})
@app.route('/resume/education', methods=['GET', 'POST'])
def education():
'''
Handles education requests
'''
if request.method == 'GET':
return jsonify({})
if request.method == 'POST':
return jsonify({})
return jsonify({})
@app.route('/resume/skill', methods=['GET', 'POST'])
def skill():
'''
Handles Skill requests
'''
if request.method == 'GET':
return jsonify({})
if request.method == 'POST':
return jsonify({})
return jsonify({})