Ejemplo n.º 1
0
#!/usr/bin/env python

from wfdb import create_app

app = create_app('wfdb.config.ProdConfig')
Ejemplo n.º 2
0
from wfdb import create_app

app = create_app('wfdb.config.TestConfig')
Ejemplo n.º 3
0
#!/usr/bin/env python3

from os import environ

from flask_script import Server, Manager
from flask_migrate import Migrate, MigrateCommand
from wfdb import create_app
from wfdb.models import db

app = create_app('wfdb.config.DevConfig')

migrate = Migrate(app, db)

manager = Manager(app)

if 'IP' in environ and 'PORT' in environ:
    manager.add_command('runserver', Server(host=environ['IP'], port=environ['PORT']))

manager.add_command('db', MigrateCommand)


@manager.shell
def make_shell_context():
    """ Creates a python REPL with several default imports
        in the context of the app
    """

    return dict(app=app)

if __name__ == "__main__":
    manager.run()
Ejemplo n.º 4
0
#!/usr/bin/env python

from flask.ext.script import Manager
from wfdb import create_app
from wfdb.models import db

app = create_app('wfdb.config.DevConfig')

manager = Manager(app)


@manager.shell
def make_shell_context():
    """ Creates a python REPL with several default imports
        in the context of the app
    """

    return dict(app=app, db=db)


if __name__ == "__main__":
    manager.run()
#!/usr/bin/env python

from wfdb import create_app

application = create_app('wfdb.config.ProdConfig')
Ejemplo n.º 6
0
from flask_script import Manager
from wfdb import create_app

app = create_app('wtfb.config.DevConfig')
manager = Manager(app)


@manager.shell
def make_shell_context():
    """ Creates a REPL with several default imports
        in the context of app

    :return:
    """
    return dict(app=app, db=db)


if __name__ == '__main__':
    manager.run()