mfusepy


Namemfusepy JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryCtypes bindings for the high-level API in libfuse 2 and 3
upload_time2024-10-27 17:14:08
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseISC
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mfusepy

`mfusepy` is a Python module that provides a simple interface to [FUSE](https://docs.kernel.org/filesystems/fuse.html) and [macFUSE](https://osxfuse.github.io/).
It's just one file and is implemented using ctypes to use [libfuse](https://github.com/libfuse/libfuse).


# Installation

```bash
pip install mfusepy
```

You also need to install the `fuse` (2) or [`fuse3`](https://pkgs.org/search/?q=fuse3) package on your system.


# About this fork

This is a fork of [fusepy](https://github.com/fusepy/fusepy) because it did not see any development for over 6 years.
[Refuse](https://github.com/pleiszenburg/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](https://github.com/mxmlnkn/ratarmount/issues/101).
I intend to maintain this fork as long as I maintain [ratarmount](https://github.com/mxmlnkn/ratarmount), which is now over 5 years old.

The main motivations for forking are:

 - [x] FUSE 3 support. Based on the [libfuse changelog](https://github.com/libfuse/libfuse/blob/master/ChangeLog.rst#libfuse-300-2016-12-08), 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.
 - [x] Translation layer performance. In benchmarks for a simple `find` call for listing 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 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](https://github.com/fusepy/fusepy)            | ISC  | [63](https://www.wheelodex.org/projects/fusepy/rdepends/) | The most popular Python-bindings, but unfortunately unmaintained for 6+ years. |
| [python-fuse](https://github.com/libfuse/python-fuse) | LGPL | [12](https://www.wheelodex.org/projects/fuse-python/rdepends/) | Written directly in C interfacing with `fuse.h` and exposing it via `Python.h`. Only supports libfuse2, not libfuse3. |
| [refuse](https://github.com/pleiszenburg/refuse)      | ISC  | [3](https://www.wheelodex.org/projects/refuse/rdepends/) | Dead fork of fusepy with many other dead forks: [[1]](https://github.com/yarikoptic/refuse) [[2]](https://github.com/YoilyL/refuse) |
| [fusepyng](https://pypi.org/project/fusepyng/)       | ISC  | [0](https://www.wheelodex.org/projects/fusepyng/rdepends/) | Dead fork of fusepy. Github repo has been force-pushed as a statement. Fork [here](https://github.com/djsutherland/fusepyng). |
| [userspacefs](https://pypi.org/project/userspacefs/)  | GPL3 (why not ISC?) | [1](https://www.wheelodex.org/projects/userspacefs/rdepends/) | Fork of fusepyng/fusepy. Gated behind self-hosting solution with no possibility to open issues or pull requests. |
| [fusepy3](https://github.com/fox-it/fusepy3)          | ISC  | Not on PyPI | Fork of fusepy for [fox-it/dissect](https://github.com/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](https://github.com/libfuse/libfuse/issues/1029) 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](https://github.com/libfuse/pyfuse3)                    | LGPL | [9](https://www.wheelodex.org/projects/pyfuse3/rdepends/) | ReadMe contains: "Warning - no longer developed!" |
| [llfuse](https://github.com/python-llfuse/python-llfuse/)        | LGPL | [2](https://www.wheelodex.org/projects/llfuse/rdepends/) | ReadMe contains: ["Warning - no longer developed!"](https://github.com/python-llfuse/python-llfuse/issues/67), but last release was 2 months ago. |
| [arvados-llfuse](https://github.com/arvados/python-llfuse/)      | LGPL | [1](https://www.wheelodex.org/projects/arvados-llfuse/rdepends/) | Fork of llfuse, but less up to date? |
| [aliyundrive-fuse](https://github.com/messense/aliyundrive-fuse) | MIT  | [0](https://www.wheelodex.org/projects/aliyundrive-fuse/rdepends/) | 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](https://github.com/ykxVK8yL5L/pikpak-fuse/), [alist-fuse](https://github.com/ykxVK8yL5L/alist-fuse) |


# Examples

See some examples of how you can use fusepy:

---------------------------------+-----------------------------
[memory](examples/memory.py)     | A simple memory filesystem
[loopback](examples/loopback.py) | A loopback filesystem
[context](examples/context.py)   | Sample usage of fuse_get_context()
[sftp](examples/sftp.py)         | 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](https://man7.org/linux/man-pages/man4/fuse.4.html), several user space libraries exist for easy access.
`libfuse` acts as the reference implementation.

 - [libfuse](https://github.com/libfuse/libfuse) (Linux, FreeBSD) (fuse.h [2](https://github.com/libfuse/libfuse/blob/fuse-2_9_bugfix/include/fuse.h) [3](https://github.com/libfuse/libfuse/blob/master/include/fuse.h))
 - [libfuse](https://github.com/openbsd/src/tree/master/lib/libfuse) (OpenBSD) (fuse.h [2](https://github.com/openbsd/src/blob/master/lib/libfuse/fuse.h))
 - [librefuse](https://github.com/NetBSD/src/tree/netbsd-8/lib/librefuse) (NetBSD) through [PUFFS](https://en.wikipedia.org/wiki/PUFFS_(NetBSD)) (fuse.h [2](https://github.com/NetBSD/src/blob/netbsd-8/lib/librefuse/fuse.h))
 - [FUSE for macOS](https://github.com/osxfuse/osxfuse) (OSX) (fuse.h [2](https://github.com/osxfuse/fuse/blob/master/include/fuse.h))
 - [MacFUSE](https://code.google.com/archive/p/macfuse/) (OSX), no longer maintained
 - [WinFsp](https://github.com/billziss-gh/winfsp) (Windows) (fuse.h [2](https://github.com/winfsp/winfsp/blob/master/inc/fuse/fuse.h) [3](https://github.com/winfsp/winfsp/blob/master/inc/fuse3/fuse.h))
 - [Dokany](https://github.com/dokan-dev/dokany) (Windows) (fuse.h [2](https://github.com/dokan-dev/dokany/blob/master/dokan_fuse/include/fuse.h))
 - [Dokan](https://code.google.com/archive/p/dokan/) (Windows), no longer maintained

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mfusepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Maximilian Knespel <mxmlnknp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9a/5e/db2e27d157c23bf2247ada9416481bb992d053a57bd22f7f766b658dc7a5/mfusepy-1.0.0.tar.gz",
    "platform": null,
    "description": "# mfusepy\n\n`mfusepy` is a Python module that provides a simple interface to [FUSE](https://docs.kernel.org/filesystems/fuse.html) and [macFUSE](https://osxfuse.github.io/).\nIt's just one file and is implemented using ctypes to use [libfuse](https://github.com/libfuse/libfuse).\n\n\n# Installation\n\n```bash\npip install mfusepy\n```\n\nYou also need to install the `fuse` (2) or [`fuse3`](https://pkgs.org/search/?q=fuse3) package on your system.\n\n\n# About this fork\n\nThis is a fork of [fusepy](https://github.com/fusepy/fusepy) because it did not see any development for over 6 years.\n[Refuse](https://github.com/pleiszenburg/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.\nSee also the discussion in [this issue](https://github.com/mxmlnkn/ratarmount/issues/101).\nI intend to maintain this fork as long as I maintain [ratarmount](https://github.com/mxmlnkn/ratarmount), which is now over 5 years old.\n\nThe main motivations for forking are:\n\n - [x] FUSE 3 support. Based on the [libfuse changelog](https://github.com/libfuse/libfuse/blob/master/ChangeLog.rst#libfuse-300-2016-12-08), 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.\n - [x] Translation layer performance. In benchmarks for a simple `find` call for listing 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.\n   - 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.\n\nThe prefix `m` in the name stands for anything you want it to: \"multi\" because multiple libfuse versions are supported, \"modded\", \"modern\", or \"Maximilian\".\n\n\n# Comparison to other libraries\n\n## High-level interface support (path-based)\n\n| Project | License | Dependants | Notes\n|-------------------------------------------------------|------|-----|------------------------|\n| [fusepy](https://github.com/fusepy/fusepy)            | ISC  | [63](https://www.wheelodex.org/projects/fusepy/rdepends/) | The most popular Python-bindings, but unfortunately unmaintained for 6+ years. |\n| [python-fuse](https://github.com/libfuse/python-fuse) | LGPL | [12](https://www.wheelodex.org/projects/fuse-python/rdepends/) | Written directly in C interfacing with `fuse.h` and exposing it via `Python.h`. Only supports libfuse2, not libfuse3. |\n| [refuse](https://github.com/pleiszenburg/refuse)      | ISC  | [3](https://www.wheelodex.org/projects/refuse/rdepends/) | Dead fork of fusepy with many other dead forks: [[1]](https://github.com/yarikoptic/refuse) [[2]](https://github.com/YoilyL/refuse) |\n| [fusepyng](https://pypi.org/project/fusepyng/)       | ISC  | [0](https://www.wheelodex.org/projects/fusepyng/rdepends/) | Dead fork of fusepy. Github repo has been force-pushed as a statement. Fork [here](https://github.com/djsutherland/fusepyng). |\n| [userspacefs](https://pypi.org/project/userspacefs/)  | GPL3 (why not ISC?) | [1](https://www.wheelodex.org/projects/userspacefs/rdepends/) | Fork of fusepyng/fusepy. Gated behind self-hosting solution with no possibility to open issues or pull requests. |\n| [fusepy3](https://github.com/fox-it/fusepy3)          | ISC  | Not on PyPI | Fork of fusepy for [fox-it/dissect](https://github.com/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](https://github.com/libfuse/libfuse/issues/1029) between libfuse3 minor versions. Last update 9 months ago. Looks like publish and forget, or it may simply have no bugs. |\n\n\n## Low-level interface support (inode/int-based)\n\nAll 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.\nIn 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.\n\n| Project | License | Dependants | Notes\n|------------------------------------------------------------------|------|-----|------------------------|\n| [pyfuse3](https://github.com/libfuse/pyfuse3)                    | LGPL | [9](https://www.wheelodex.org/projects/pyfuse3/rdepends/) | ReadMe contains: \"Warning - no longer developed!\" |\n| [llfuse](https://github.com/python-llfuse/python-llfuse/)        | LGPL | [2](https://www.wheelodex.org/projects/llfuse/rdepends/) | ReadMe contains: [\"Warning - no longer developed!\"](https://github.com/python-llfuse/python-llfuse/issues/67), but last release was 2 months ago. |\n| [arvados-llfuse](https://github.com/arvados/python-llfuse/)      | LGPL | [1](https://www.wheelodex.org/projects/arvados-llfuse/rdepends/) | Fork of llfuse, but less up to date? |\n| [aliyundrive-fuse](https://github.com/messense/aliyundrive-fuse) | MIT  | [0](https://www.wheelodex.org/projects/aliyundrive-fuse/rdepends/) | 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](https://github.com/ykxVK8yL5L/pikpak-fuse/), [alist-fuse](https://github.com/ykxVK8yL5L/alist-fuse) |\n\n\n# Examples\n\nSee some examples of how you can use fusepy:\n\n---------------------------------+-----------------------------\n[memory](examples/memory.py)     | A simple memory filesystem\n[loopback](examples/loopback.py) | A loopback filesystem\n[context](examples/context.py)   | Sample usage of fuse_get_context()\n[sftp](examples/sftp.py)         | A simple SFTP filesystem (requires paramiko)\n\n\n# Platforms\n\nmfusepy requires FUSE 2.6 (or later) and runs on:\n\n- Linux (i386, x86_64, PPC, arm64, MIPS)\n- Mac OS X (Intel, PowerPC)\n- FreeBSD (i386, amd64)\n\nWhile FUSE is (at least in the Unix world) a [Kernel feature](https://man7.org/linux/man-pages/man4/fuse.4.html), several user space libraries exist for easy access.\n`libfuse` acts as the reference implementation.\n\n - [libfuse](https://github.com/libfuse/libfuse) (Linux, FreeBSD) (fuse.h [2](https://github.com/libfuse/libfuse/blob/fuse-2_9_bugfix/include/fuse.h) [3](https://github.com/libfuse/libfuse/blob/master/include/fuse.h))\n - [libfuse](https://github.com/openbsd/src/tree/master/lib/libfuse) (OpenBSD) (fuse.h [2](https://github.com/openbsd/src/blob/master/lib/libfuse/fuse.h))\n - [librefuse](https://github.com/NetBSD/src/tree/netbsd-8/lib/librefuse) (NetBSD) through [PUFFS](https://en.wikipedia.org/wiki/PUFFS_(NetBSD)) (fuse.h [2](https://github.com/NetBSD/src/blob/netbsd-8/lib/librefuse/fuse.h))\n - [FUSE for macOS](https://github.com/osxfuse/osxfuse) (OSX) (fuse.h [2](https://github.com/osxfuse/fuse/blob/master/include/fuse.h))\n - [MacFUSE](https://code.google.com/archive/p/macfuse/) (OSX), no longer maintained\n - [WinFsp](https://github.com/billziss-gh/winfsp) (Windows) (fuse.h [2](https://github.com/winfsp/winfsp/blob/master/inc/fuse/fuse.h) [3](https://github.com/winfsp/winfsp/blob/master/inc/fuse3/fuse.h))\n - [Dokany](https://github.com/dokan-dev/dokany) (Windows) (fuse.h [2](https://github.com/dokan-dev/dokany/blob/master/dokan_fuse/include/fuse.h))\n - [Dokan](https://code.google.com/archive/p/dokan/) (Windows), no longer maintained\n",
    "bugtrack_url": null,
    "license": "ISC",
    "summary": "Ctypes bindings for the high-level API in libfuse 2 and 3",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/mxmlnkn/mfusepy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c7c5a848bc9599cc5d4f835e586219c28593bf848df9793d694a516562419f2",
                "md5": "b940d233576de5d46d0a2e8193c5a338",
                "sha256": "8871ce7334a15631ad97924fb410546d16d5d0bc1a8f3d8508f1eeb926d5b97e"
            },
            "downloads": -1,
            "filename": "mfusepy-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b940d233576de5d46d0a2e8193c5a338",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21089,
            "upload_time": "2024-10-27T17:14:06",
            "upload_time_iso_8601": "2024-10-27T17:14:06.217866Z",
            "url": "https://files.pythonhosted.org/packages/9c/7c/5a848bc9599cc5d4f835e586219c28593bf848df9793d694a516562419f2/mfusepy-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a5edb2e27d157c23bf2247ada9416481bb992d053a57bd22f7f766b658dc7a5",
                "md5": "ea067bad554545032fd190c0c6b20980",
                "sha256": "be92234cb330e25df004fb11f2e2bdc2084d4d10fb6b00f2f534540bc66c18a2"
            },
            "downloads": -1,
            "filename": "mfusepy-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ea067bad554545032fd190c0c6b20980",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21797,
            "upload_time": "2024-10-27T17:14:08",
            "upload_time_iso_8601": "2024-10-27T17:14:08.050369Z",
            "url": "https://files.pythonhosted.org/packages/9a/5e/db2e27d157c23bf2247ada9416481bb992d053a57bd22f7f766b658dc7a5/mfusepy-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 17:14:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mxmlnkn",
    "github_project": "mfusepy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mfusepy"
}
        
Elapsed time: 3.49034s