当前位置: 首页>>代码示例>>Python>>正文


Python six.iteritems方法代码示例

本文整理汇总了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) 
开发者ID:JohnStarich,项目名称:python-pool-performance,代码行数:7,代码来源:gunicorn_server.py

示例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) 
开发者ID:akzaidi,项目名称:fine-lm,代码行数:8,代码来源:server.py

示例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) 
开发者ID:aws,项目名称:sagemaker-xgboost-container,代码行数:7,代码来源:serve.py

示例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) 
开发者ID:app-registry,项目名称:appr,代码行数:9,代码来源:gunicorn_app.py

示例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) 
开发者ID:qunarcorp,项目名称:open_dnsdb,代码行数:8,代码来源:gunicorn_app.py

示例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") 
开发者ID:internetarchive,项目名称:brozzler,代码行数:10,代码来源:__init__.py

示例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) 
开发者ID:kennell,项目名称:curldrop,代码行数:12,代码来源:server.py

示例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() 
开发者ID:aws,项目名称:sagemaker-rl-container,代码行数:16,代码来源:serve.py

示例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) 
开发者ID:chaoss,项目名称:augur,代码行数:10,代码来源:run.py


注:本文中的gunicorn.six.iteritems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。