Wrap a boto StreamingBody in the IOBase API.
| 28 | table_name_prefix = os.environ.get('ItemsTableNamePrefix', 'PersonalizationApiItemMetadata_') |
| 29 | |
| 30 | class StreamingBodyIO(RawIOBase): |
| 31 | """Wrap a boto StreamingBody in the IOBase API.""" |
| 32 | def __init__(self, body): |
| 33 | self.body = body |
| 34 | |
| 35 | def readable(self): |
| 36 | return True |
| 37 | |
| 38 | def read(self, n: int = -1): |
| 39 | n = None if n < 0 else n |
| 40 | return self.body.read(n) |
| 41 | |
| 42 | @tracer.capture_method |
| 43 | def bulk_load_datastore(bucket: str, key: str, namespace: str): |
no outgoing calls
no test coverage detected