input: Write a python function to make a simple Flask app with SQLAlchemy, including a route to query data from a SQLite database, and return the result in JSON format.
  assert isinstance(app, Flask)
  assert app.config['SQLALCHEMY_DATABASE_URI'] == 'sqlite:////tmp/test.db'
  assert hasattr(db, 'session')
  assert callable(get_data)
output: def create_app():
      from flask import Flask, jsonify
      from flask_sqlalchemy import SQLAlchemy
  
      app = Flask(__name__)
      app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
      app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
  
      db = SQLAlchemy(app)
  
      class Data(db.Model):
          id = db.Column(db.Integer, primary_key=True)
          value = db.Column(db.String(80), unique=True, nullable=False)
  
      @app.route('/data')
      def get_data():
          data = Data.query.all()
          return jsonify([{'id': d.id, 'value': d.value} for d in data])
  
      with app.app_context():
          db.create_all()
  
      return app, db, get_data
  
  app, db, get_data = create_app()