Ejemplo n.º 1
0
from flask_rest_api.application import create_app
app = create_app('development')

app.run(debug=True)
Ejemplo n.º 2
0
 def setUp(self):
     self.app = create_app('development')
     self.client = self.app.test_client()
     db.create_all(app=self.app)
Ejemplo n.º 3
0
 def setUp(self):
     self.app = create_app('testing')
     self.client = self.app.test_client()
Ejemplo n.º 4
0
import os

from flask_rest_api.application import create_app

"""
WSGI config for this project.

It exposes the WSGI callable as a module-level variable named ``application``.
"""

env = os.environ.get('APP_ENV')

if not env:
    raise Exception('APP_ENV not found.')

application = create_app(env)
Ejemplo n.º 5
0
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from flask_rest_api import db
from flask_rest_api.application import create_app

app = create_app("development")

migrate = Migrate(app, db)

manager = Manager(app)
manager.add_command("db", MigrateCommand)

if __name__ == "__main__":
    manager.run()
 def setUp(self):
     self.app = create_app('development')
     self.client = self.app.test_client()
     db.create_all(app=self.app)