Skip to main content

Use fuse-overlayfs to mount/unmount overlayfs in Python

Project description

Python wrapper of fuse-overlayfs

fuse-overlayfs is an implementation of overlay+shiftfs in FUSE for rootless containers, and the command name. See this project's homepage.

Install

Just run the command: pip install fuse-overlayfs.

Or you can download and install the wheel file from release page manually.

Usage

A simple mount:

>>> from fuseoverlayfs import FuseOverlayFS
>>> fuse_overlayfs = FuseOverlayFS.init()
>>> mnt = '/path/to/mountpoint'
>>> lowerdirs = ['/path/to/lowerdir1', '/path/to/lowerdir2']
>>> upperdir = '/path/to/upperdir'
>>> workdir = '/path/to/workdir'
>>> fuse_overlayfs.mount(mnt, lowerdirs, upperdir=upperdir, workdir=workdir)
>>>

A read-only mount, just remove argument upperdir and workdir:

>>> from fuseoverlayfs import FuseOverlayFS
>>> fuse_overlayfs = FuseOverlayFS.init()
>>> mnt = '/path/to/another/mountpoint'
>>> lowerdirs = ['/path/to/lowerdir3', '/path/to/lowerdir4']
>>> fuse_overlayfs.mount(mnt, lowerdirs)
>>>

For more helpful information, see docstrings:

>>> from fuseoverlayfs import FuseOverlayFS
>>> help(FuseOverlayFS.mount)
>>> help(FuseOverlayFS.unmount)
>>>

Project details


Download files

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

Source Distribution

fuse-overlayfs-0.1.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

fuse_overlayfs-0.1.0-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page