Skip to main content

DRB fuse implementation

Project description

Drb Fuse Representation

This drb-fuse module implements a representation of DrbNode as a field system. It is able to navigates among the DrbNode contents.

FsNode

FsNode is the node that implement the Fuse representation of a node.

An example that represent a xml node from the file test.xml on directory /tmp/hello/:

Create a FsNode with argument 'node' and 'mountpoint' And after sets up a fuse file system that represent the node. The directory pointed by 'mountpoint' must exist

from multiprocessing import Process
from drb.drivers.file import DrbFileFactory
from drb.fuse import FsNode

xml_file = "files" / "test.xml"
node_file = DrbFileFactory().create(xml_file)
fsnode = FsNode(node_file, '/tmp/hello/')

process_fs = Process(target=fsnode.run_fs(),
                     kwargs={'node': node, 'mountpoint': '/tmp/hello/'}

Same example with functions start_fs: The function start_fs create the directory if the directory not exists And create an instance of FsNode with 'node' and 'mountpoint' and launch the method 'run_fs()' from the instance of FsNode

from multiprocessing import Process
from drb.drivers.file import DrbFileFactory
from drb.fuse import FsNode
from drb.fuse.drb_fuse3 import start_fs

xml_file = "files" / "test.xml"

node_file = DrbFileFactory().create(xml_file)
process_fs = Process(target=start_fs,
                     kwargs={'node': node, 'mountpoint': '/tmp/hello/'}

Using this module

To include this module into your project, the drb-fuse module shall be referenced into requirement.txt file, or the following pip line can be run:

pip install drb-fuse

The fuse3 library have to be installed

For ubuntu the following command line can be run:

sudo apt install fuse3 libfuse3-dev

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

drb-fuse-1.0.0.tar.gz (22.3 kB view hashes)

Uploaded Source

Built Distribution

drb_fuse-1.0.0-py3-none-any.whl (5.8 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