ooai_skills.s3

MinIO/S3 adapter.

Attributes

Classes

Module Contents

ooai_skills.s3.UploadNotifyCallback
class ooai_skills.s3.S3Client
client: minio.Minio
bucket: str
on_upload: list[UploadNotifyCallback] = []
static from_settings(settings)
Parameters:

settings (ooai_skills.settings.OoaiSkillsSettings)

Return type:

S3Client

ensure_bucket()
Return type:

None

put_json(key, data)
Parameters:
Return type:

None

get_json(key)
Parameters:

key (str)

Return type:

dict[str, Any] | None

upload_dir(local_dir, prefix)
Parameters:
Return type:

None

download_prefix(prefix, dest_dir)
Parameters:
Return type:

int

presigned_get(key, expires=timedelta(hours=1))

Generate a presigned GET URL for downloading an object.

Parameters:
Return type:

str

presigned_put(key, expires=timedelta(hours=1))

Generate a presigned PUT URL for uploading an object.

Parameters:
Return type:

str