text: from functools import wraps
  from flask import make_response
  from sqlalchemy import create_engine
  from sqlalchemy.orm import sessionmaker
  
  # 初始化数据库连接:
  engine = create_engine('mysql+pymysql://ash_0225:Xucheng_0225@116.62.21.15:3306/python_test', encoding="utf-8", echo=True)
  # 创建DBSession类型:
  DBSession = sessionmaker(bind=engine)
  # 创建session对象:
  session = DBSession()
  
  
  def allow_cross_domain(fun):
      @wraps(fun)
      def wrapper_fun(*args, **kwargs):
          rst = make_response(fun(*args, **kwargs))
          rst.headers['Access-Control-Allow-Origin'] = '*'
          rst.headers['Access-Control-Allow-Credentials'] = True
          rst.headers['Access-Control-Allow-Methods'] = 'PUT,GET,POST,DELETE'
          allow_headers = "Referer, Accept, Origin, User-Agent, X-Requested-With, Content-Type"
          rst.headers['Access-Control-Allow-Headers'] = allow_headers
          return rst
      return wrapper_fun
  