コード例 #1
0
ファイル: run.py プロジェクト: jbenito3/claimstore
def main():
    """Create app and run server."""
    app = create_app()
    app.run(
        host=app.config['CLAIMSTORE_HOST'],
        port=app.config['CLAIMSTORE_PORT'],
        debug=app.config['CLAIMSTORE_DEBUG']
    )
コード例 #2
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--initdb",
                        help="creates all db structure",
                        action='store_true')
    args = parser.parse_args()

    app = create_app(args.initdb)
    app.run(host='0.0.0.0', port=8080, debug=True)
コード例 #3
0
ファイル: run.py プロジェクト: lnielsen/claimstore
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--initdb",
        help="creates all db structure",
        action='store_true'
    )
    args = parser.parse_args()

    app = create_app(args.initdb)
    app.run(host='0.0.0.0', port=8080, debug=True)
コード例 #4
0
def clifactory():
    """Create a click CLI application based on configuration.

    :param create_app: Flask application factory function.
    """
    # Create application object without loading the full application.
    app = create_app()

    def create_cli_app(info):
        return app

    @click.group(cls=FlaskGroup, create_app=create_cli_app)
    def cli(**params):
        pass

    # Register CLI modules from packages.
    cli.add_command(database_cli)
    cli.add_command(eqid_cli)

    return cli
コード例 #5
0
ファイル: cli.py プロジェクト: jbenito3/claimstore
def clifactory():
    """Create a click CLI application based on configuration.

    :param create_app: Flask application factory function.
    """
    # Create application object without loading the full application.
    app = create_app()

    def create_cli_app(info):
        return app

    @click.group(cls=FlaskGroup, create_app=create_cli_app)
    def cli(**params):
        pass

    # Register CLI modules from packages.
    cli.add_command(database_cli)
    cli.add_command(eqid_cli)

    return cli
コード例 #6
0
ファイル: app.py プロジェクト: jbenito3/claimstore
def app():
    """Create the flask app."""
    app_ = create_app()
    with app_.app_context():
        yield app_
コード例 #7
0
# -*- coding: utf-8 -*-
#
# This file is part of ClaimStore.
# Copyright (C) 2015 CERN.
#
# ClaimStore is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ClaimStore is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ClaimStore; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
"""WSGI app creation."""

from __future__ import absolute_import

from claimstore.app import create_app

application = create_app()
コード例 #8
0
ファイル: wsgi.py プロジェクト: jbenito3/claimstore
# -*- coding: utf-8 -*-
#
# This file is part of ClaimStore.
# Copyright (C) 2015 CERN.
#
# ClaimStore is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ClaimStore is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ClaimStore; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.

"""WSGI app creation."""

from __future__ import absolute_import

from claimstore.app import create_app

application = create_app()