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.dev33.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.dev33.tar.gz.

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev33.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.dev33.tar.gz
Algorithm Hash digest
SHA256 211090f051b6adc7c5e6d53029da738887cb4e7abc8f3717a2d436ce62dd3682
MD5 f49e1a8e54c8f3e2e24aca06da94076a
BLAKE2b-256 48d27dafa558741e60da36d849378919d68ef5957f7bc1e2a022f819ece94a94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev33-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.dev33-py3-none-any.whl
Algorithm Hash digest
SHA256 ad71d6fa8357cf1d3e17631e6c034aa100f9d0763008539b8a6337ec5d7bf42c
MD5 22a6c70a5bb8f8516e11f6f3e1638a91
BLAKE2b-256 f0340e64092f85aff4934aa5a61ff41d4e2f9f56ac2b2d73ba116625a7f8b118

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