Skip to main content

GitHub storage adapter stub for Peagen

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_storage_github


Swarmauri GitHub Storage Adapter

GithubStorageAdapter is a lightweight placeholder storage adapter for Peagen. It returns deterministic github:// URIs for uploaded objects without making any network calls to GitHub. The class is useful for demos, tests, and for validating code paths that rely on the storage adapter interface.

Installation

Choose the tool that matches your workflow:

# pip
pip install swarmauri_storage_github

# Poetry
poetry add swarmauri_storage_github

# uv
uv add swarmauri_storage_github

Quickstart

GithubStorageAdapter.upload() accepts a key and a binary file-like object. It returns the key formatted as a github:// URI so callers can wire the adapter into pipelines that expect GitHub-backed storage without performing any remote I/O.

from io import BytesIO

from swarmauri_storage_github import GithubStorageAdapter


adapter = GithubStorageAdapter()

# The adapter only inspects the key, so any binary stream is acceptable.
payload = BytesIO(b"# Example README\nThis payload would be uploaded to GitHub.")
uri = adapter.upload("my-org/my-repo/README.md", payload)

print(uri)  # github://my-org/my-repo/README.md

Behavior and limitations

  • upload() does not persist data—it simply echoes the key back as a github:// URI.
  • download(), upload_dir(), and download_dir() raise NotImplementedError to signal that full GitHub support is intentionally out of scope for this stub.

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_storage_github-0.2.0.dev52.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_storage_github-0.2.0.dev52.tar.gz.

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev52.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_storage_github-0.2.0.dev52.tar.gz
Algorithm Hash digest
SHA256 921abaebd54382b365b65fb9668f7edfca1d0df7e6e86206a6aaba3a31a17390
MD5 a53d8c75a78c956df41218f25c8c1c63
BLAKE2b-256 837b37ba7834f8765a37c6a586ad944b337ca05c23afbc6e91918bc9bd9c4a60

See more details on using hashes here.

File details

Details for the file swarmauri_storage_github-0.2.0.dev52-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev52-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_storage_github-0.2.0.dev52-py3-none-any.whl
Algorithm Hash digest
SHA256 f1cb53f422cf03fb0b784b8e9ea07203f5c3087928adb73cdd3b4b4b2d967268
MD5 eaca51993eccb791a3e9b95fd883c726
BLAKE2b-256 41aea01684b9a5647a2e564d764e7ae3a9faef673d7b3cd2607c43df185e4cf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page