MCPcopy Create free account
hub / github.com/aws-samples/personalization-apis / StreamingBodyIO

Class StreamingBodyIO

src/load_item_metadata_function/main.py:30–40  ·  view source on GitHub ↗

Wrap a boto StreamingBody in the IOBase API.

Source from the content-addressed store, hash-verified

28table_name_prefix = os.environ.get('ItemsTableNamePrefix', 'PersonalizationApiItemMetadata_')
29
30class 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
43def bulk_load_datastore(bucket: str, key: str, namespace: str):

Callers 2

build_dbm_fileFunction · 0.85
bulk_write_ddb_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected