本文整理汇总了Python中gunicorn.six.iteritems方法的典型用法代码示例。如果您正苦于以下问题:Python six.iteritems方法的具体用法?Python six.iteritems怎么用?Python six.iteritems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gunicorn.six
的用法示例。
在下文中一共展示了six.iteritems方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
config = dict([(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
示例2: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
"""Loads the configuration."""
config = dict([(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
示例3: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
for key, value in iteritems(self.options):
key = key.lower()
if key in self.cfg.settings and value is not None:
self.cfg.set(key, value)
示例4: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
config = dict([(key, value) for key, value in iteritems(vars(self.args_options))
if key in self.cfg.settings and value is not None])
for key, value in iteritems(self.defaults):
config[key] = value
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
示例5: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
config = dict([(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
config['logger_class'] = GunicornLogger
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
示例6: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
config = dict(
[(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
self.cfg.set("logger_class", BypassGunicornLogging)
self.cfg.set("accesslog", "dummy-value")
示例7: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
config = dict(
[
(key, value)
for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None
]
)
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
示例8: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
"""Load configuration.
Configuration is loaded from the options passed in the constructor,
and then load arguments from the CLI and the environment variable GUNICORN_CMD_ARGS.
Arguments in the environment variable take precedence.
See http://docs.gunicorn.org/en/stable/settings.html
"""
for key, value in iteritems(self.options):
key = key.lower()
if key in self.cfg.settings and value is not None:
self.cfg.set(key, value)
self.load_vars()
示例9: load_config
# 需要导入模块: from gunicorn import six [as 别名]
# 或者: from gunicorn.six import iteritems [as 别名]
def load_config(self):
"""
Sets the values for configurations
"""
config = dict([(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)