本文整理匯總了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)