Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

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

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.

Metadata

Release files for swarmauri_gitfilter_file 0.11.0.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_gitfilter_file 0.11.0.dev1
File Size Uploaded
swarmauri_gitfilter_file-0.11.0.dev1.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_gitfilter_file 0.11.0.dev1
File Interpreter ABI Platform
swarmauri_gitfilter_file-0.11.0.dev1-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / swarmauri_gitfilter_file-0.11.0.dev1.tar.gz

Download URL swarmauri_gitfilter_file-0.11.0.dev1.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6e671a5ad3dc70b838117ce6ba81e63e3d366171d1bfc6079f8f4a622402d62f
BLAKE2b-256 checksum
How to use checksums
dd255ae9b7741fb28eb144158380803fe5fa63900713b3dccd939096328d71e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

Release files / swarmauri_gitfilter_file-0.11.0.dev1-py3-none-any.whl

Download URL swarmauri_gitfilter_file-0.11.0.dev1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33f62b123695ad5d0e4e7d85cca6d96d7062da097990b239b59ac7c6462a5204
BLAKE2b-256 checksum
How to use checksums
39ee5d88748342ff50ef5a2d9065b631e73dc7999b8052667af6804241adb6ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page