本文整理匯總了Python中flask.__version__方法的典型用法代碼示例。如果您正苦於以下問題:Python flask.__version__方法的具體用法?Python flask.__version__怎麽用?Python flask.__version__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類flask
的用法示例。
在下文中一共展示了flask.__version__方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: log_messages
# 需要導入模塊: import flask [as 別名]
# 或者: from flask import __version__ [as 別名]
def log_messages(app):
"""Log messages common to Tornado and devserver."""
log = logging.getLogger(__name__)
log.info('Server is running at http://{}:{}/'.format(app.config['HOST'], app.config['PORT']))
log.info('Flask version: {}'.format(flask.__version__))
log.info('DEBUG: {}'.format(app.config['DEBUG']))
log.info('STATIC_FOLDER: {}'.format(app.static_folder))
示例2: log_messages
# 需要導入模塊: import flask [as 別名]
# 或者: from flask import __version__ [as 別名]
def log_messages(app, port, fsh_folder):
"""Log messages common to Tornado and devserver."""
log = logging.getLogger(__name__)
log.info('Server is running at http://0.0.0.0:{}/'.format(port))
log.info('Flask version: {}'.format(flask.__version__))
log.info('DEBUG: {}'.format(app.config['DEBUG']))
log.info('FLASK_STATICS_HELPER_FOLDER: {}'.format(fsh_folder))
log.info('STATIC_FOLDER: {}'.format(app.static_folder))
示例3: hello_world
# 需要導入模塊: import flask [as 別名]
# 或者: from flask import __version__ [as 別名]
def hello_world():
return jsonify({
'framework': 'Flask {}'.format(flask.__version__),
'application': APPLICATION_NAME,
})
示例4: injetar_extrainfo
# 需要導入模塊: import flask [as 別名]
# 或者: from flask import __version__ [as 別名]
def injetar_extrainfo():
return dict(
sathubconf=sathubconf,
flask_version=flask.__version__,
python_version=platform.python_version(),
platform_uname=' | '.join(platform.uname()),
produto=dict(nome='SATHub', versao=sathub_version))