get_object_bytes#
- torch_brain.utils.s3.get_object_bytes(bucket, key, *, s3_client=None)[source]#
Read a single S3 object into memory.
- Parameters:
- Return type:
- Returns:
Object contents as bytes, or
Noneif the object does not exist on S3.- Raises:
RuntimeError – If the read fails for a reason other than the object being absent.
ImportError – If boto3/botocore is not installed.