支持api获取状态

This commit is contained in:
2019-04-07 15:30:57 +08:00
committed by JerryYan
parent f8d4be5385
commit b9b0994f4c
6 changed files with 300 additions and 106 deletions

8
Model/DataBase.py Normal file
View File

@ -0,0 +1,8 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URL"] = "sqlite://data.db"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
db = SQLAlchemy(app)