3 ms·
While I can see the logic behind that, what you are giving up is proper credential support (profile, env, instance, pod, etc) and a decent built in retry/except
by orf 5y ago
While I can see the logic behind that, what you are giving up is proper credential support (profile, env, instance, pod, etc) and a decent built in retry/exception policy. Using boto3 the entire library becomes something like:
s3_client = boto3.client("s3")
class S3VFS:
def get_range(self, from_, to_):
return s3_client.get_object(..., Range=f'bytes={from_}-{to_}')['Body'].read()
with apsw.Connection(..., vfs=S3VFS())
That's drastically simpler, and safer to include from a library consumer point of view.