Skip to main content

Quickly conjure up virtual fileysystems

Project description

MagicFS (mafs)

MagicFS is an easy-to-use library that allows anyone to easily create virtual filesystems using FUSE.

MagicFS allows you to redirect file requests, so instead of the request going to an underlying storage medium like a hard drive, the request goes to a program that you've written.

If you like the idea of playing around with virtual filesystems, but have been put off by the complexity of it all, then this library could be for you. You can easily create whole, feature-complete filesystems in just a few lines of code. No need for painstakingly dealing with folder structures and buffers, mafs manages all the low-level details, provides sane defaults, and lets you focus on the functionality.

Installation

MagicFS is available on pypi, and can be easily installed with pip.

$ pip3 install mafs

Examples

All of the examples are listed in examples/. Here's a demo of running the places.py example.

$ mkdir fs
$ python3 examples/places.py fs
$ ls fs
place  shortcut
$ ls fs/place
here  there
$ cat fs/place/here
this is here
$ cat fs/place/there
this is there
$ cat fs/place/anywhere
this is anywhere!
$ fusermount -u fs

Development

To download MagicFS for development, execute the following commands:

$ git clone https://github.com/jedevc/mafs.git
$ cd mafs
$ pip3 install -r requirements.txt

To launch mafs with an example, execute the following:

$ PYTHONPATH=. python3 examples/places.py fs -fg

Note the use of the PYTHONPATH environment variable to include the library, and the use of the -fg flag to run mafs in the foreground for easier debugging.

Tests

To run the tests for MagicFS, install nose, and then use it to run the tests.

$ pip install nose
$ nosetests

If you make any changes, please run the tests before you commit to ensure that you haven't broken anything.

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

mafs-0.2.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mafs-0.2.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file mafs-0.2.1.tar.gz.

File metadata

  • Download URL: mafs-0.2.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for mafs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 be52e8fcdb88a325fc915b88e23a495d4799dbc8d02788b44bdec751c0ddcdd9
MD5 1a62a69a94554bfd43f82e6180ec266f
BLAKE2b-256 3970fb0ce76421f2d9729f89d4dbd37f72768c414532900a22ea017fb20c99b6

See more details on using hashes here.

File details

Details for the file mafs-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mafs-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for mafs-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbfd379ab1f8522d5bd81bcbea6a3295ea74ed61925596dfb5b9e05b0f09aaf6
MD5 1a16c673535bbbb8cab751a9ecbc934c
BLAKE2b-256 971dc7df872b4af6691eb674810039ebd94df0cca4f5d7cf94df9aff6d26d788

See more details on using hashes here.

Supported by

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