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

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev34.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.dev34.tar.gz
Algorithm Hash digest
SHA256 4ea4f65c044e7f08aedd18272b57115c12ab0580e0eb9a054d27b82c10963b78
MD5 a61e506360284ec25055f7064cbcd626
BLAKE2b-256 dbc6387bfaf2d5d4a0696b0f639d94cfc25d0ef34cceb2a0d04f9587219def72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_storage_github-0.2.0.dev34-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.dev34-py3-none-any.whl
Algorithm Hash digest
SHA256 970872e936aad6c8b42c26a35a59e9a694e409c50fff24ded28429bd4e857626
MD5 178a50f0682c439c4768c09a434492ea
BLAKE2b-256 3bbb447eb99396125a3bb7aac060ba5615458f1922006660ad33f2c4626f5201

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