Skip to content

Class swarmauri_storage_github.github_storage_adapter.GithubStorageAdapter

swarmauri_storage_github.github_storage_adapter.GithubStorageAdapter

GithubStorageAdapter(**kwargs)

Bases: StorageAdapterBase

Source code in swarmauri_storage_github/github_storage_adapter.py
12
13
14
def __init__(self, **kwargs) -> None:
    super().__init__(**kwargs)
    self.kwargs = kwargs

kwargs instance-attribute

kwargs = kwargs

upload

upload(key, data)
Source code in swarmauri_storage_github/github_storage_adapter.py
16
17
def upload(self, key: str, data: BinaryIO) -> str:  # pragma: no cover - stub
    return f"github://{key}"

download

download(key)
Source code in swarmauri_storage_github/github_storage_adapter.py
19
20
def download(self, key: str) -> BinaryIO:  # pragma: no cover - stub
    raise NotImplementedError("download() not implemented")

upload_dir

upload_dir(src, *, prefix='')
Source code in swarmauri_storage_github/github_storage_adapter.py
22
23
24
25
def upload_dir(
    self, src: str | os.PathLike, *, prefix: str = ""
) -> None:  # pragma: no cover - stub
    raise NotImplementedError("upload_dir() not implemented")

download_dir

download_dir(prefix, dest_dir)
Source code in swarmauri_storage_github/github_storage_adapter.py
27
28
29
30
def download_dir(
    self, prefix: str, dest_dir: str | os.PathLike
) -> None:  # pragma: no cover - stub
    raise NotImplementedError("download_dir() not implemented")

from_uri classmethod

from_uri(uri)
Source code in swarmauri_storage_github/github_storage_adapter.py
32
33
34
@classmethod
def from_uri(cls, uri: str) -> "GithubStorageAdapter":  # pragma: no cover - stub
    return cls()