<filename>100_flask_api.py<gh_stars>0
from flask import Flask
from os import system
import json

app = Flask(__name__)

data = [
    {"empId": 100, "fullname": "<NAME>", "emailId": "<EMAIL>"},
    {"empId": 101, "fullname": "<NAME>", "emailId": "<EMAIL>"},
    {"empId": 102, "fullname": "<NAME>", "emailId": "<EMAIL>"}
]


@app.route("/api/v1/employees", methods=["GET"])
def welcome():
    return json.dumps(data)


if __name__ == "__main__":
    app.run(port=9090)

<filename>100_flask_api.py<gh_stars>0
from flask import Flask
from os import system
import json

app = Flask(__name__)

data = [
    {"empId": 100, "fullname": "<NAME>", "emailId": "<EMAIL>"},
    {"empId": 101, "fullname": "<NAME>", "emailId": "<EMAIL>"},
    {"empId": 102, "fullname": "<NAME>", "emailId": "<EMAIL>"}
]


@app.route("/api/v1/employees", methods=["GET"])
def welcome():
    return json.dumps(data)


if __name__ == "__main__":
    app.run(port=9090)
