Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Quickly mount fuse filesystems in temporary directories

Project description

Github PyPi Python

EzFuse

EzFuse is a tool handle temporary mountpoints for Fuse filesystems.

Features:

  • automatically create and remove a directory to mount the filesystem
  • interactive shell dialog to execute actions
  • you can mount, umount the mountpoint
  • you can open a shell in the mounted directory
  • you can open your file browser in the mounted directory
  • you can exit the EzFuse and keep the mountpoint mounted

demo.gif

Install

Install via pip:

# Install pip for python3
$ sudo apt install python3-pip
$ pip install ezfuse

Or you can clone the project and install it via setup.py:

# Install python3
$ sudo apt install python3 python3-setuptools
# Clone repository
$ git clone https://github.com/essembeh/ezfuse
$ cd ezfuse
# If you are in a virtualenv, install it with
$ python3 setup.py install
# or use --user if you want to install it in userland
$ python3 setup.py install --user

To setup a development environment:

$ git clone https://github.com/essembeh/ezfuse
$ cd ezfuse
$ make venv
$ source venv/bin/activate
(venv) $ make install # equivalent to ./setup.py install
(venv) $ make # To run the tests, coverage and flake8
(venv) $ make watch # to reinstall automatically if you modify the source code

Usage

To mount a remote folder using sshfs ensure that sshfs is installed on your system before.

While the temporary directory is created, EzFuse is interactive and you are prompted for an action:

$ ezfuse --type sshfs MYREMOTEHOST:/some/path/here
[info] Using mountpoint ezmount-sshfs-9dy6yb34
[exec] sshfs MYREMOTEHOST:/some/path/here ezmount-sshfs-9dy6yb34

x: exit
q: umount and exit
o: xdg-open
s: shell
m: mount
u: umount
[x/q/o/s/m/u] 

dialog.png

When exiting EzFuse using q, the filesystem will automatically be unmounted and the temporary directory removed.

Note: All executed commands are displayed with [exec] prefix.

Advanced usage: use symlinks

By default, you have to pass the -t, --type to EzFuse to specify which Fuse filesystem to use, but you can also create symplinks to avoid that.

For example, to use sshfs, create a symlink named ezsshfs pointing to ezfuse

$ mkdir -p ~/.local/bin/
$ ln -s $(which ezfuse) ~/.local/bin/ezsshfs
# Now the two commands are equivalent
$ ezsshfs MYREMOTEHOST:/some/path/here
$ ezfuse -t sshfs MYREMOTEHOST:/some/path/here

You can do it for every Fuse filesystem you may use, like borgfsfor example:

$ ln -s $(which ezfuse) ~/.local/bin/ezborgfs
$ ezborgfs /path/to/my/backup.borg/

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ezfuse, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ezfuse-0.1.0-py3-none-any.whl (10.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ezfuse-0.1.0.tar.gz (617.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page