api.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:deckhand 作者: att-comdev 项目源码 文件源码
def init_application():
    """Main entry point for initializing the Deckhand API service.

    Create routes for the v1.0 API and sets up logging.
    """
    config_files = _get_config_files()
    paste_file = config_files[-1]

    CONF([], project='deckhand', default_config_files=config_files)
    setup_logging(CONF)

    policy.Enforcer(CONF)

    LOG.debug('Starting WSGI application using %s configuration file.',
              paste_file)

    db_api.drop_db()
    db_api.setup_db()

    app = deploy.loadapp('config:%s' % paste_file, name='deckhand_api')
    return app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号