def __init__(self, client=None): if client is not None: self.client = client elif BOTO3_INSTALLED: self.client = boto3_client.Client() else: message = 'AWS dependencies are not installed, and no alternative ' \ 'client was provided to S3IO.' raise RuntimeError(message)
def __init__(self, client=None, options=None): if client is None and options is None: raise ValueError('Must provide one of client or options') if client is not None: self.client = client elif BOTO3_INSTALLED: self.client = boto3_client.Client(options=options) else: message = 'AWS dependencies are not installed, and no alternative ' \ 'client was provided to S3IO.' raise RuntimeError(message)