def client(*args, **kwargs):
"""
Create a low-level service client by name using the default session.
Socket level timeouts are preconfigured according to the defaults set via
the `fleece.boto3.set_default_timeout()` function, or they can also be set
explicitly for a client by passing the `timeout`, `connect_timeout` or
`read_timeout` arguments.
"""
timeout = kwargs.pop('timeout', DEFAULT_TIMEOUT)
connect_timeout = kwargs.pop('connect_timeout',
DEFAULT_CONNECT_TIMEOUT or timeout)
read_timeout = kwargs.pop('read_timeout', DEFAULT_READ_TIMEOUT or timeout)
config = Config(connect_timeout=connect_timeout,
read_timeout=read_timeout)
return real_boto3.client(*args, config=config, **kwargs)
评论列表
文章目录