Class swarmauri_storage_minio.minio_storage_adapter.MinioStorageAdapter
swarmauri_storage_minio.minio_storage_adapter.MinioStorageAdapter
MinioStorageAdapter(
endpoint,
access_key,
secret_key,
bucket,
*,
secure=True,
prefix="",
**kwargs,
)
Bases: StorageAdapterBase
Simple wrapper around the MinIO client for use with Peagen.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
root_uri
property
root_uri
Return the base URI as minio[s]://endpoint/bucket/prefix/
.
upload
upload(key, data)
Upload data to bucket/prefix/key
and return the artifact URI.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
download
download(key)
Return a BytesIO
for the object prefix/key
.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
93 94 95 96 97 98 99 100 101 102 103 |
|
upload_dir
upload_dir(src, *, prefix='')
Recursively upload a directory under prefix
.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
106 107 108 109 110 111 112 113 114 |
|
iter_prefix
iter_prefix(prefix)
Yield keys under prefix
relative to the run root.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
117 118 119 120 121 122 123 124 125 |
|
download_dir
download_dir(prefix, dest_dir)
Download everything under prefix
into dest_dir
.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
128 129 130 131 132 133 134 135 136 |
|
from_uri
classmethod
from_uri(uri)
Create an adapter from a minio[s]://
URI and env/TOML creds.
Source code in swarmauri_storage_minio/minio_storage_adapter.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|