Skip to main content

MinIO git filter for Peagen

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_gitfilter_minio


Swarmauri Git Filter Minio

swarmauri_gitfilter_minio packages the MinioFilter plugin used by peagen and other Swarmauri tooling to keep large Git objects in MinIO (or any S3-compatible) storage instead of the local repository. The filter implements both StorageAdapterBase and GitFilterBase, so you can call it directly from Python code or register it as a Git clean/smudge filter.

Highlights

  • Accepts minio:// (HTTP) and minios:// (HTTPS) URIs and automatically ensures the referenced bucket exists.
  • Inherits GitFilterBase, giving you clean and smudge helpers that hash content, upload it to remote storage, and hydrate it back into your working tree on checkout.
  • Provides convenience methods such as upload_dir, iter_prefix, and download_prefix for whole directory trees in addition to single-file transfers.
  • Surfaces a root_uri property that reflects the bucket and optional prefix derived from the connection string.

Installation

Choose the workflow that matches your project:

# pip
pip install swarmauri_gitfilter_minio

# Poetry
poetry add swarmauri_gitfilter_minio

# uv
uv add swarmauri_gitfilter_minio

Configuration

MinioFilter.from_uri() consults peagen.toml for credentials under [storage.filters.minio] and falls back to the MINIO_ACCESS_KEY and MINIO_SECRET_KEY environment variables when the configuration is absent. When instantiated, the filter lazily creates the bucket identified by the URI and stores objects beneath an optional prefix.

Usage

from swarmauri_gitfilter_minio import MinioFilter

# Create a filter from a connection string. The scheme `minios://` will use
# HTTPS while `minio://` uses plain HTTP.
filt = MinioFilter.from_uri("minio://localhost:9000/my-bucket/prefix")

# Upload a file and retrieve its URI
with open("README.md", "rb") as fh:
    uri = filt.upload("docs/README.md", fh)

# Download the file back into memory
buffer = filt.download("docs/README.md")
data = buffer.read()

MinioFilter also exposes helpers such as upload_dir, iter_prefix, and download_prefix for working with entire directory trees.

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_gitfilter_minio-0.3.0.dev47.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

swarmauri_gitfilter_minio-0.3.0.dev47-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_gitfilter_minio-0.3.0.dev47.tar.gz.

File metadata

  • Download URL: swarmauri_gitfilter_minio-0.3.0.dev47.tar.gz
  • Upload date:
  • Size: 9.1 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_gitfilter_minio-0.3.0.dev47.tar.gz
Algorithm Hash digest
SHA256 3e85feb7cb7122bd48c28683f4e8d9e53bb02dbdef1dab3d448dbf6fe95adb60
MD5 a20886f05fb4ac9824b9466bc788a2e2
BLAKE2b-256 5e9a6e1f5b65c6105e44c24c5c3a506daf202765d75970454874a1c89e9c1e39

See more details on using hashes here.

File details

Details for the file swarmauri_gitfilter_minio-0.3.0.dev47-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_gitfilter_minio-0.3.0.dev47-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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_gitfilter_minio-0.3.0.dev47-py3-none-any.whl
Algorithm Hash digest
SHA256 59a2fa7558901166e0c80b2c0bed09b8b1bb3c26a7a5517ad13d02bdf9b77616
MD5 9e996c616622be7b0ac893706a13e6dd
BLAKE2b-256 ad7af68e05f1507b2d933914ebd1da8ed49160601e33832b6596e691eca3b415

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