# -*- encoding: utf-8 -*-
from flask import Flask,session
app = Flask(__name__)
app.config.from_pyfile('config.ini')
@app.route('/')
def index():
return '这是首页'
@app.route('/set_session')
def set_session():
session['username'] = '数据123'
return '存储成功'
@app.route('/get_session')
def get_session():
se = session['username']
return se
@app.route('/del_session')
def del_session():
session.pop('username')
return '删除成功'
if __name__ == "__main__":
app.run()