h1st.model_repository.storage.s3 module

class h1st.model_repository.storage.s3.S3Storage(bucket_name: str = '', prefix: str = '')[source]

Bases: h1st.model_repository.storage.base.Storage

Provide data storage on top of AWS S3

__init__(bucket_name: str = '', prefix: str = '')[source]
  • bucket_name – s3 bucket name to store data into

  • prefix – s3 object prefix, leave blank to store at bucket root

get_obj(name: str) → Any[source]

Retrieve object value


name – object name

get_bytes(name) → bytes[source]

Retrieve object value in bytes


name – object name

set_obj(name: str, value: Any) → NoReturn[source]

Set key value to a python object

  • name – object name

  • value – value in python object

set_bytes(name: str, value: bytes) → NoReturn[source]

Set a key value to a list of bytes

  • name – object name

  • value – value in bytes

exists(name: str) → bool[source]

Return true if object exists in the storage

delete(name: str) → NoReturn[source]

Delete an object in storage