Skip to main content

Filesystem git filter for Peagen

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_gitfilter_file


Swarmauri Git Filter File

Filesystem backed git filter for Peagen.

FileFilter combines the FileStorageAdapter storage backend with the GitFilterBase helpers from swarmauri_base. The filter stores git-cleaned objects beneath a local directory, deduplicating each payload by its SHA-256 digest and retrieving the bytes on smudge.

Installation

Install the package with your preferred Python packaging tool:

pip install swarmauri_gitfilter_file
poetry add swarmauri_gitfilter_file
uv pip install swarmauri_gitfilter_file

Usage

FileFilter.from_uri accepts file:// URIs and resolves them to the directory where objects will be stored. You can also instantiate FileFilter directly by passing an output_dir.

import tempfile
from pathlib import Path

from swarmauri_gitfilter_file import FileFilter

with tempfile.TemporaryDirectory() as tmpdir:
    uri = Path(tmpdir).as_uri()
    filt = FileFilter.from_uri(uri)
    oid = filt.clean(b"hello")
    assert oid.startswith("sha256:")
    assert filt.smudge(oid) == b"hello"

The returned object identifier includes the sha256: prefix, matching the digest used to deduplicate objects on disk.

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_file-0.3.0.dev36.tar.gz (6.7 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_gitfilter_file-0.3.0.dev36.tar.gz.

File metadata

  • Download URL: swarmauri_gitfilter_file-0.3.0.dev36.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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_file-0.3.0.dev36.tar.gz
Algorithm Hash digest
SHA256 930c56387938f2a2395c2ef8bacc46e53dbae7010e3b8dd8d92076cd8e0c554b
MD5 caeaa679114fdf6c14ac02230f6aa16b
BLAKE2b-256 85662adb5b28962dfd5a2fb9590b13c5a4a75e6305ee70b369d8b1e6a8b31087

See more details on using hashes here.

File details

Details for the file swarmauri_gitfilter_file-0.3.0.dev36-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_gitfilter_file-0.3.0.dev36-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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_file-0.3.0.dev36-py3-none-any.whl
Algorithm Hash digest
SHA256 578d8ca0cf90a0c16fca0f8d42452ceb4cc6c1abe9fccb3a7b050f86d893a66b
MD5 31b5d9c07eb9c241f3f25bc2367d8a62
BLAKE2b-256 382d25a8bd4a683c5f558533d2bc07dc8af7c39c6b1e2ea55b73306e2c5eb8c5

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