Class swarmauri_storage_github_release.gh_release_storage_adapter.GithubReleaseStorageAdapter
swarmauri_storage_github_release.gh_release_storage_adapter.GithubReleaseStorageAdapter
GithubReleaseStorageAdapter(
token,
org,
repo,
tag,
*,
release_name=None,
message="",
draft=False,
prerelease=False,
prefix="",
**kwargs,
)
Bases: StorageAdapterBase
Storage adapter that uses GitHub Releases to store and retrieve assets.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
root_uri
property
root_uri
Return the base ghrel:// URI for this adapter.
upload
upload(key, data)
Upload data
under key
as a release asset and return the artifact URI.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
download
download(key)
Return the bytes of asset key
as a BytesIO object.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
upload_dir
upload_dir(src, *, prefix='')
Upload all files under src using an optional prefix.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
123 124 125 126 127 128 129 130 131 |
|
iter_prefix
iter_prefix(prefix)
Yield asset keys under prefix.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
133 134 135 136 137 138 139 140 141 142 |
|
download_dir
download_dir(prefix, dest_dir)
Download all assets under prefix into dest_dir.
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
144 145 146 147 148 149 150 151 152 |
|
from_uri
classmethod
from_uri(uri)
Source code in swarmauri_storage_github_release/gh_release_storage_adapter.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|