示例#1
0
 def __init__(self, *, configs=None, retry=True):
     if configs is None:
         configs = Config.get_defaults()
     if isinstance(configs, Config):
         configs = [configs]
     self._configs = configs
     self._active_config_idx = 0
     self._listeners = defaultdict(list)
     self._connection = self._make_connection()
     self._top_block = None
     self._retry = retry
示例#2
0
    def __init__(self, *, configs=None, retry=True):
        if configs is None:
            configs = Config.get_defaults()
        if isinstance(configs, Config):
            configs = [configs]
        self._configs = configs
        self._active_config_idx = 0
        self._listeners = defaultdict(list)
        self._connection = self._make_connection()
        self._top_block = None
        self._retry = retry

        # instantiate the request client
        self.cli = OpenAPICli(configs[0].api_url, configs[0].api_url_internal)