# granite_storage.backends.s3

class granite_storage.backends.s3.S3StorageBackend(*, bucket: str, prefix: str = '', client: BaseClient | None = None, extra_put_kwargs: dict[str, Any] | None = None)

  Bases: `StorageBackend`

  __init__(*, bucket: str, prefix: str = '', client: BaseClient | None = None, extra_put_kwargs: dict[str, Any] | None = None)
  backend_name: str = 's3'
  delete(ref: StoredObjectRef) → None
  exists(ref: StoredObjectRef) → bool
  get(ref: StoredObjectRef) → bytes
  iter_locations(prefix: str | None = None) → Iterator[str]
  open(ref: StoredObjectRef) → BinaryIO
  put_bytes(*, key: str, content: bytes, content_type: str | None = None, original_filename: str | None = None, extra: dict[str, Any] | None = None) → StoredObjectRef
  put_stream(*, key: str, stream: BinaryIO, size: int | None = None, checksum: str | None = None, content_type: str | None = None, original_filename: str | None = None, extra: dict[str, Any] | None = None) → StoredObjectRef