A FUSE filesystem that mounts an Apache ZooKeeper tree as a local directory.
Project description
fusedzoo
A FUSE filesystem that mounts an Apache ZooKeeper tree as a local directory, backed by kazoo.
The dual znode model
ZooKeeper znodes are simultaneously containers (they have children) and data holders (they carry a byte payload). fusedzoo exposes both facets at once:
- Every znode
/a/b/cmaps to a directory at the mountpoint. - The znode's data payload is exposed through a virtual file named
.zk-datainside that directory.
/mnt/zk/
my/
favorite/ <- znode /my/favorite (ls to see children)
.zk-data <- read/write the node's raw byte payload
node/ <- child znode /my/favorite/node
.zk-data
| Filesystem operation | ZooKeeper operation |
|---|---|
ls /mnt/zk/a/b |
get_children(/a/b) |
cat /mnt/zk/a/b/.zk-data |
get(/a/b) |
echo foo > /mnt/zk/a/b/.zk-data |
set(/a/b, b"foo") |
mkdir /mnt/zk/a/b/c |
create(/a/b/c, b"") |
rmdir /mnt/zk/a/b/c |
delete(/a/b/c) (if childless) |
Node data is passed through as raw bytes with no encoding.
Installation
pip install fusedzoo # default: fusepy (libfuse2) backend
pip install fusedzoo[pyfuse3] # opt-in: pyfuse3 (libfuse3, async) backend
The host system needs libfuse installed (libfuse2 for the fusepy backend,
libfuse3 for pyfuse3) and a usable /dev/fuse device.
Usage
fusedzoo mount localhost:2181 /mnt/zk # mounts in the foreground
fusedzoo umount /mnt/zk
See fusedzoo mount --help for pool sizing, backend selection, read-only, and
experimental poll options.
# Create a znode
mkdir /mnt/zk/services
# Write its payload
echo '{"host": "db1"}' > /mnt/zk/services/.zk-data
# Read it back
cat /mnt/zk/services/.zk-data
# Inspect ZooKeeper metadata as extended attributes
getfattr -d /mnt/zk/services
# Remove a childless znode
rmdir /mnt/zk/services
Note:
dfwill not show fusedzoo in plaindf -hbecause ZooKeeper has no filesystem capacity concept and the mount reports0/0blocks. Usedf -h -aordf -h /mnt/zkto see it explicitly.
Development
hatch run release # ruff + mypy + pytest --cov + hatch build (full gate)
hatch run dry_release # same but non-blocking (continues on failure)
hatch run docs:build # build Sphinx docs
License
Apache 2.0
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 fusedzoo-0.1.0.tar.gz.
File metadata
- Download URL: fusedzoo-0.1.0.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b32b669ba22f99f83f25e733957c58797b861714a9f2f0fa5198eaa3b7abc11
|
|
| MD5 |
0ae374ac9a0e5c10ed00abc7268e6ddb
|
|
| BLAKE2b-256 |
275da1fe8e5a2a5b8c39ee8a172f0e7b709c18448058f3316569b220ec981d1a
|
Provenance
The following attestation bundles were made for fusedzoo-0.1.0.tar.gz:
Publisher:
ci.yml on ModdingFox/fusedzoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fusedzoo-0.1.0.tar.gz -
Subject digest:
5b32b669ba22f99f83f25e733957c58797b861714a9f2f0fa5198eaa3b7abc11 - Sigstore transparency entry: 1988800342
- Sigstore integration time:
-
Permalink:
ModdingFox/fusedzoo@51a28ad04caf168cd6214f8ad734d215e7634b7b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ModdingFox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@51a28ad04caf168cd6214f8ad734d215e7634b7b -
Trigger Event:
push
-
Statement type:
File details
Details for the file fusedzoo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fusedzoo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c0ca36f73c628728aeb74197a60845efececbfcec3ddd290c3f51bba31cb66
|
|
| MD5 |
d036b35209c15792c1170a83568d267b
|
|
| BLAKE2b-256 |
4e64086ef1e0be8a5ac9f1601c5b52272f5d5273d04a1faac93c1c92cf3bf084
|
Provenance
The following attestation bundles were made for fusedzoo-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on ModdingFox/fusedzoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fusedzoo-0.1.0-py3-none-any.whl -
Subject digest:
f0c0ca36f73c628728aeb74197a60845efececbfcec3ddd290c3f51bba31cb66 - Sigstore transparency entry: 1988800413
- Sigstore integration time:
-
Permalink:
ModdingFox/fusedzoo@51a28ad04caf168cd6214f8ad734d215e7634b7b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ModdingFox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@51a28ad04caf168cd6214f8ad734d215e7634b7b -
Trigger Event:
push
-
Statement type: