TreeFuse
TreeFuse is a library for building FUSE filesystem CLIs from treelib Tree objects.
It wraps python-fuse to provide a CLI entrypoint (treefuse_main) which takes a tree parameter and uses that to construct a directory tree and generate file content within the FUSE filesystem.
Free software: GNU General Public License v3
Documentation: https://treefuse.readthedocs.io.
Example Program
Executing this program:
import treelib
from treefuse import treefuse_main
tree = treelib.Tree()
root = tree.create_node("root")
dir1 = tree.create_node("dir1", parent=root)
tree.create_node("dirchild", parent=dir1, data=b"dirchild content\n")
tree.create_node("rootchild", parent=root, data=b"rootchild content\n")
treefuse_main(tree)
With a target directory (e.g. python3 example.py mnt) will mount a filesystem matching the given tree:
$ tree mnt mnt ├── dir1 │ └── dirchild └── rootchild 1 directory, 2 files $ cat mnt/rootchild rootchild content $ cat mnt/dir1/dirchild dirchild content
See Examples for more examples.
Roadmap
Abstract the interface so that sources other than treelib can be implemented
Provide a mechanism for library consumers to populate filesystem contents asynchronously
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
This library was written during a hack week at my employer, DigitalOcean.
History
1.1.2 (2021-07-30)
Fix up one missed 3.6 reference.
1.1.1 (2021-07-30)
Make drop of support for Python 3.6 official.
1.1.0 (2021-07-30)
Substantial refactor to introduce the internal infrastructure for non-treelib TreeFuseProvider classes.
1.0.0 (2021-07-28)
Add documentation.
Implement support for providing non-default stat values for nodes (via treefuse.TreeFuseStat).
Replace temporary ENOENT error returns with more appropriate codes.
Fix default usage string.
0.1.0 (2021-07-27)
First release on PyPI.
Metadata
Release files for treefuse 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| treefuse-1.1.2.tar.gz | 23.5 kB | Without provenance | Details for treefuse-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| treefuse-1.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for treefuse-1.1.2-py2.py3-none-any.whl |
Total release size: 32.4 kB
Release files / treefuse-1.1.2.tar.gz
| Download URL | treefuse-1.1.2.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92be5082172bab19b9abec962e936071d9e3452bc932bce2827520d53ade4b46
|
|
BLAKE2b-256 checksum How to use checksums |
a4f1a234b161cc0487f9865bd00a6bb1ec7bc04da001210baeb29822b2f58d5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|
Release files / treefuse-1.1.2-py2.py3-none-any.whl
| Download URL | treefuse-1.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a8635dd3c4ac4e83ecf8e4a98a8ace45eeb8e54ccceb5924018b8e5d6c718b8f
|
|
BLAKE2b-256 checksum How to use checksums |
514c5cc57466481ccf160ebbb3cb6c6d99b98a8288c3d95e7770baa233bc6a62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|
Security for treefuse 1.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.