Filesystem git filter for Peagen
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_gitfilter_file-0.3.0.dev46.tar.gz.
File metadata
- Download URL: swarmauri_gitfilter_file-0.3.0.dev46.tar.gz
- Upload date:
- Size: 6.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb74e636bc46a7f9eec2f509e147aac6da89e90c0b45b478c8862d2f831026a7
|
|
| MD5 |
ff71cf2acfb1e44090a55536e0f9bbf5
|
|
| BLAKE2b-256 |
f5aa420198fa5f29a8f22b9d8992cee067831cc13b8d4f4a6f5b3b0f260058a2
|
File details
Details for the file swarmauri_gitfilter_file-0.3.0.dev46-py3-none-any.whl.
File metadata
- Download URL: swarmauri_gitfilter_file-0.3.0.dev46-py3-none-any.whl
- Upload date:
- Size: 7.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e663a9b6691c8cc23bb5fbab1bf35d2f947fc3fa3677a4f86c40a543c91b0c
|
|
| MD5 |
fcb9666d0da1d6e7149a7c650d685e6f
|
|
| BLAKE2b-256 |
bea475e749f465ddfa7760bbd663dde2134917a433036774f7c1543698216484
|