from flask import Flask
import threading
import time

app = Flask(__name__)


t_buff = 0
f_buff = 0
h_buff = 0



@app.route('/get_num_1', methods=["GET"])
def get_num_1():
    with open('number.txt', 'r') as f:
            lines = f.readline() 
    print(lines)
    t_buff = lines.split()[0]
    f_buff = lines.split()[1]
    h_buff = lines.split()[2]

    num_dict = {
        't': t_buff,
        'f': f_buff,
        'h': h_buff,
    }
    return num_dict




@app.route('/get_table', methods=["GET"])
def get_table():
    v = {
        'id': "100",
        'First_Name': "Y",
        'Last_Name': "D",
        "User_Name": "C"
    }
    return v


if __name__ == '__main__':
    # t1 = threading.Thread(target=read_from_txt, )
    # t1.start()
    app.run()
