當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。