Ctypes bindings for the high-level API in libfuse 2 and 3
Project description
mfusepy
mfusepy
is a Python module that provides a simple interface to FUSE and macFUSE.
It's just one file and is implemented using ctypes to use libfuse.
Installation
pip install mfusepy
You also need to install the fuse
(2) or fuse3
package on your system.
About this fork
This is a fork of fusepy because it did not see any development for over 6 years. Refuse was an attempt to fork fusepy, but it has not seen any development for over 4 years. Among lots of metadata changes, it contains two bugfixes to the high-level API, which I have redone in this fork. See also the discussion in this issue. I intend to maintain this fork as long as I maintain ratarmount, which is now over 5 years old.
The main motivations for forking are:
- FUSE 3 support. Based on the libfuse changelog, the amount of breaking changes should be fairly small. It should be possible to simply update these ten or so changed structs and functions in the existing fusepy.
- Translation layer performance. In benchmarks for a simple
find
call for listing all files, some callbacks such asreaddir
turned out to be significantly limited by converting Python dictionaries to ctype structs. The idea would be to expose the ctype structs to the fusepy caller.- Much of the performance was lost trying to populate the stat struct even though only the mode member is used by the kernel FUSE API.
The prefix m
in the name stands for anything you want it to: "multi" because multiple libfuse versions are supported, "modded", "modern", or "Maximilian".
Comparison to other libraries
High-level interface support (path-based)
Project | License | Dependants | Notes |
---|---|---|---|
fusepy | ISC | 63 | The most popular Python-bindings, but unfortunately unmaintained for 6+ years. |
python-fuse | LGPL | 12 | Written directly in C interfacing with fuse.h and exposing it via Python.h . Only supports libfuse2, not libfuse3. |
refuse | ISC | 3 | Dead fork of fusepy with many other dead forks: [1] [2] |
fusepyng | ISC | 0 | Dead fork of fusepy. Github repo has been force-pushed as a statement. Fork here. |
userspacefs | GPL3 (why not ISC?) | 1 | Fork of fusepyng/fusepy. Gated behind self-hosting solution with no possibility to open issues or pull requests. |
fusepy3 | ISC | Not on PyPI | Fork of fusepy for fox-it/dissect ecosystem to add libfuse3 support. Seems to drop libfuse2 support though and I it does not seem to work around the ABI incompatibilities between libfuse3 minor versions. Last update 9 months ago. Looks like publish and forget, or it may simply have no bugs. |
Low-level interface support (inode/int-based)
All these libraries only wrap the low-level libfuse interface, which works with inodes instead of paths, and therefore are not (easily) usable for my use case. In the end, there is mostly only some path-to-hash table in the high-level libfuse API, but it is cumbersome to implement and performance-critical.
Project | License | Dependants | Notes |
---|---|---|---|
pyfuse3 | LGPL | 9 | ReadMe contains: "Warning - no longer developed!" |
llfuse | LGPL | 2 | ReadMe contains: "Warning - no longer developed!", but last release was 2 months ago. |
arvados-llfuse | LGPL | 1 | Fork of llfuse, but less up to date? |
aliyundrive-fuse | MIT | 0 | Alibaba Cloud Disk FUSE disk mount "This repository has been archived by the owner on Mar 28, 2023". Only Chinese documentation. Only read support. Multiple fizzled out forks: pikpak-fuse, alist-fuse |
Examples
See some examples of how you can use fusepy:
---------------------------------+----------------------------- memory | A simple memory filesystem loopback | A loopback filesystem context | Sample usage of fuse_get_context() sftp | A simple SFTP filesystem (requires paramiko)
Platforms
mfusepy requires FUSE 2.6 (or later) and runs on:
- Linux (i386, x86_64, PPC, arm64, MIPS)
- Mac OS X (Intel, PowerPC)
- FreeBSD (i386, amd64)
While FUSE is (at least in the Unix world) a Kernel feature, several user space libraries exist for easy access.
libfuse
acts as the reference implementation.
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
File details
Details for the file mfusepy-1.0.0.tar.gz
.
File metadata
- Download URL: mfusepy-1.0.0.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be92234cb330e25df004fb11f2e2bdc2084d4d10fb6b00f2f534540bc66c18a2 |
|
MD5 | ea067bad554545032fd190c0c6b20980 |
|
BLAKE2b-256 | 9a5edb2e27d157c23bf2247ada9416481bb992d053a57bd22f7f766b658dc7a5 |
File details
Details for the file mfusepy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mfusepy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8871ce7334a15631ad97924fb410546d16d5d0bc1a8f3d8508f1eeb926d5b97e |
|
MD5 | b940d233576de5d46d0a2e8193c5a338 |
|
BLAKE2b-256 | 9c7c5a848bc9599cc5d4f835e586219c28593bf848df9793d694a516562419f2 |