Skip to main content

mfusepy

Python Version PyPI version Downloads Changelog License Build Status Discord Telegram

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

Via PyPI:

pip install mfusepy

You also need to install the fuse (2) or fuse3 package on your system.

Versioning

This version tries to follow Semantic Versioning. If you depend on this project, you should fix the major version, or else you risk your project breaking on a newer version release! E.g., in your pyproject.toml:

dependencies = ["mfusepy ~= 3.2",]

If you have tested with multiple major versions and they are known to work, you can relax the constraint for maximum compatibility:

dependencies = ["mfusepy >= 1.1, < 4.0",]

If you are migrating from fusepy, pinning to mfusepy ~= 1.1 is the recommended first step for best compatibility.

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 many 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 the fork 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 that lists all files, some callbacks such as readdir 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 and inode member are 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 with 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 a self-hosted solution with no possibility to open issues or pull requests.
fusepy3 ISC Not on PyPI Fork of fusepy for the fox-it/dissect ecosystem to add libfuse3 support. Seems to drop libfuse2 support and does not appear to work around the ABI incompatibilities between libfuse3 minor versions. Last updated 1.5 years 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!".
arvados-llfuse LGPL 1 Fork of llfuse, but less up to date?
aliyundrive-fuse MIT 0 Alibaba Cloud Disk FUSE disk mounting. "This repository has been archived by the owner on Mar 28, 2023". Documentation is only in Chinese. Read-only support. Multiple fizzled-out forks: pikpak-fuse, alist-fuse

Examples

See some examples of how you can use mfusepy:

Example Description
memory A simple memory filesystem
memory_nullpath A memory filesystem using nullpath_ok
loopback A loopback filesystem
context Sample usage of fuse_get_context()
sftp A simple SFTP filesystem (requires paramiko)
acl A filesystem implementing ACL xattrs
readdir_with_offset A filesystem implementing readdir_with_offset
readdir_returning_offsets A filesystem returning readdir offsets

Platforms

mfusepy requires FUSE 2.8 (or later) and runs on:

  • Linux (i386, x86_64, PPC, arm64, MIPS, riscv64)
  • macOS (Apple Silicon, Intel)
  • FreeBSD (amd64)
  • NetBSD (amd64)
  • OpenBSD (amd64)
  • OmniOS (amd64)

Linux struct layouts follow glibc. 32-bit musl and Bionic struct stat layouts are not modeled.

FUSE 3 is currently supported on Linux and NetBSD. Other platforms use their FUSE 2-compatible implementations.

While FUSE is (at least in the Unix world) a Linux kernel feature, several user space libraries exist for easy access. libfuse acts as the reference implementation.

Known Dependents

Metadata

Release files for mfusepy 3.2.0

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

Source distribution (sdist)

Source distribution for mfusepy 3.2.0
File Size Uploaded Provenance Actions
mfusepy-3.2.0.tar.gz 78.2 kB With provenance Details for mfusepy-3.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mfusepy 3.2.0
File Interpreter ABI Platform Actions
mfusepy-3.2.0-py3-none-any.whl Python 3 none any Details for mfusepy-3.2.0-py3-none-any.whl

Total release size: 118.4 kB

Release files / mfusepy-3.2.0.tar.gz

Download URL mfusepy-3.2.0.tar.gz
Size 78.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5e149ef4ce22516996fce232251da7569c2b6bfd9e28b10a7503eae59d88b0d3
BLAKE2b-256 checksum
How to use checksums
cb0dd2bb9376fceea6199ecf53d4c563d51128f08e730820029ba3b4190740e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / mfusepy-3.2.0-py3-none-any.whl

Download URL mfusepy-3.2.0-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cbcb155f8483e27b4bd2ac8d2b4b8c36b84b353847bef616ee8f447475baa6a
BLAKE2b-256 checksum
How to use checksums
fdc820e55f544b82799b141107eac7cf29304989549ff429254b0998aee15e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for mfusepy 3.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mfusepy-3.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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