fs.rclonefs


Namefs.rclonefs JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryPyfilesystem interface to control rclone remotes.
upload_time2024-08-04 05:03:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Access rclone from a pyfilesystem interface

__version__ = 0.5.1



## About

This gives you a `pyfilesystem` object with an `rclone` remote for a backend. So any backend you can use with rclone, you can use with pyfilesystem. (You need to configure rclone separately.)


### Usage

This assumes you've run the external program `rclone config` and configured a remote called `dropbox:`.

    >>> from fs.rclonefs import RcloneFS
    >>> my_remote = RcloneFS('dropbox:')
    >>> my_remote.listdir('/')

More examples:

    >>> my_remote.getinfo('/that file over there.mp4')
    >>> my_remote.remove('/that file over there.mp4')
    >>> my_remote.getinfo('/some folder', namespaces=['details'])

Use the 'storage' namespace to get directory sizes.

    >>> my_remote.getinfo('/gigantor', namespaces=['storage'])

The `removetree()` method uses rclone's `purge` command -- which should make quick work of directories and their contents -- really quick work if the rclone backend supports the purge command (like Dropbox does).

(The pyfilesystem default `removetree()` does a path walk and removes every item individually which causes a lot of calls to the rclone backend and takes a long time to complete large trees, tying up rclone for several minutes.)

### USE AT YOUR OWN RISK

Things might not work as expected. Like any other household product, you should test it on a small out-of-the-way place first before dumping it all over everything.

I went ahead and ran the pyfilesystem tests on my personal dropbox...

The simple stuff, listed below, works.

### Status

Working:
- getinfo()
- listdir()
- isdir()/isfile()
- exists()
- remove()
- removedir()
- removetree()
- writetext()
- readtext()

TODO:
- URI opener
- address pyfilesystem unittest failures
- make copy methods efficient between reclone remotes
  (Currently we rely on a TempFS to cache files,
  which is in addition to whatever caching is being
  done by rclone already, so we're looking at multiple
  copies being made if we use two pyfilesystem instances
  and try to copy between them.)

## Dependencies

#### Automatically installed: pyfilesystem 2.4.12

The Mac-Daddy of all file system abstractions -- along side rclone -- and FUSE. But _absolutely_ number one of the number ones.

Installed automagically with fs-rclone if'n y'all don't already have it.

#### You need to install: rclone v1.67.0

Control a wide variety of cloud storage with this puppy.

[github.com/rclone/rclone](https://github.com/rclone/rclone)
[Install rclone on your own.](https://rclone.org/install/)

__version_used_by_this_project__ = _rclone-v1.67.0-linux-amd64_


## Tools

The `Rclone` object class controls `rclone` on your system.

    >>>from fs.rclonefs import Rclone
    >>>rclone = Rclone()
    >>>rclone.list_files('myremote:')



## Changelog

0.5.1 Fixed relative import issue that prevented module from loading.

0.5.0 Implement `openbin()` and internal file handles to support `writetext()` and `readtext()` methods. Implement `upload()` and `download()` methods also. Add unittest `tests.py` -- (in src folder, not tests folder).

0.4.0 Add `remove()`, `removedir()`, `removetree()`. Add `Rclone` class. Add `storage` namespace for getinfo(). Fix datetime format in getinfo.

0.3.1 Fixed `fs` namespace packaging.

0.3.0 Add `getinfo()`, `listdir()`, `isdir()`. Add `makepy` tool. Add `Devnotes.ipynb`.

0.2.0 Fix project name for pyfilesystem style. Add src RcloneFS.ipynb and opener.ipynb.

0.1.2 Update README

0.1.0 Add dependencies to `pyproject.toml`. Add `SoftBOM` (software bill of materials). Delete test code.

0.0.1 fix bug in example::add_one

0.0.0 configure package files

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fs.rclonefs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Raygan Henley <raygan@raygan.com>",
    "download_url": "https://files.pythonhosted.org/packages/2b/32/3cf9600f3a518aba86ca7c16b7c0b755270475b8f5aba69ed2f23526bc53/fs_rclonefs-0.5.1.tar.gz",
    "platform": null,
    "description": "# Access rclone from a pyfilesystem interface\n\n__version__ = 0.5.1\n\n\n\n## About\n\nThis gives you a `pyfilesystem` object with an `rclone` remote for a backend. So any backend you can use with rclone, you can use with pyfilesystem. (You need to configure rclone separately.)\n\n\n### Usage\n\nThis assumes you've run the external program `rclone config` and configured a remote called `dropbox:`.\n\n    >>> from fs.rclonefs import RcloneFS\n    >>> my_remote = RcloneFS('dropbox:')\n    >>> my_remote.listdir('/')\n\nMore examples:\n\n    >>> my_remote.getinfo('/that file over there.mp4')\n    >>> my_remote.remove('/that file over there.mp4')\n    >>> my_remote.getinfo('/some folder', namespaces=['details'])\n\nUse the 'storage' namespace to get directory sizes.\n\n    >>> my_remote.getinfo('/gigantor', namespaces=['storage'])\n\nThe `removetree()` method uses rclone's `purge` command -- which should make quick work of directories and their contents -- really quick work if the rclone backend supports the purge command (like Dropbox does).\n\n(The pyfilesystem default `removetree()` does a path walk and removes every item individually which causes a lot of calls to the rclone backend and takes a long time to complete large trees, tying up rclone for several minutes.)\n\n### USE AT YOUR OWN RISK\n\nThings might not work as expected. Like any other household product, you should test it on a small out-of-the-way place first before dumping it all over everything.\n\nI went ahead and ran the pyfilesystem tests on my personal dropbox...\n\nThe simple stuff, listed below, works.\n\n### Status\n\nWorking:\n- getinfo()\n- listdir()\n- isdir()/isfile()\n- exists()\n- remove()\n- removedir()\n- removetree()\n- writetext()\n- readtext()\n\nTODO:\n- URI opener\n- address pyfilesystem unittest failures\n- make copy methods efficient between reclone remotes\n  (Currently we rely on a TempFS to cache files,\n  which is in addition to whatever caching is being\n  done by rclone already, so we're looking at multiple\n  copies being made if we use two pyfilesystem instances\n  and try to copy between them.)\n\n## Dependencies\n\n#### Automatically installed: pyfilesystem 2.4.12\n\nThe Mac-Daddy of all file system abstractions -- along side rclone -- and FUSE. But _absolutely_ number one of the number ones.\n\nInstalled automagically with fs-rclone if'n y'all don't already have it.\n\n#### You need to install: rclone v1.67.0\n\nControl a wide variety of cloud storage with this puppy.\n\n[github.com/rclone/rclone](https://github.com/rclone/rclone)\n[Install rclone on your own.](https://rclone.org/install/)\n\n__version_used_by_this_project__ = _rclone-v1.67.0-linux-amd64_\n\n\n## Tools\n\nThe `Rclone` object class controls `rclone` on your system.\n\n    >>>from fs.rclonefs import Rclone\n    >>>rclone = Rclone()\n    >>>rclone.list_files('myremote:')\n\n\n\n## Changelog\n\n0.5.1 Fixed relative import issue that prevented module from loading.\n\n0.5.0 Implement `openbin()` and internal file handles to support `writetext()` and `readtext()` methods. Implement `upload()` and `download()` methods also. Add unittest `tests.py` -- (in src folder, not tests folder).\n\n0.4.0 Add `remove()`, `removedir()`, `removetree()`. Add `Rclone` class. Add `storage` namespace for getinfo(). Fix datetime format in getinfo.\n\n0.3.1 Fixed `fs` namespace packaging.\n\n0.3.0 Add `getinfo()`, `listdir()`, `isdir()`. Add `makepy` tool. Add `Devnotes.ipynb`.\n\n0.2.0 Fix project name for pyfilesystem style. Add src RcloneFS.ipynb and opener.ipynb.\n\n0.1.2 Update README\n\n0.1.0 Add dependencies to `pyproject.toml`. Add `SoftBOM` (software bill of materials). Delete test code.\n\n0.0.1 fix bug in example::add_one\n\n0.0.0 configure package files\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Pyfilesystem interface to control rclone remotes.",
    "version": "0.5.1",
    "project_urls": {
        "Homepage": "https://github.com/element0/fs.rclonefs",
        "Issues": "https://github.com/element0/fs.rclonefs/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83af6f15d2832e83077cbd5650eb758fc3fe3cc858495ffe0a22bc9eba60eaaa",
                "md5": "4913df2dd7db9fb9ec19fba7d3632e0c",
                "sha256": "9a7d9c455d4059dc12d147dd05b25ddc347a7e6af3b8dcea879073a848a962d9"
            },
            "downloads": -1,
            "filename": "fs_rclonefs-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4913df2dd7db9fb9ec19fba7d3632e0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8121,
            "upload_time": "2024-08-04T05:03:12",
            "upload_time_iso_8601": "2024-08-04T05:03:12.995768Z",
            "url": "https://files.pythonhosted.org/packages/83/af/6f15d2832e83077cbd5650eb758fc3fe3cc858495ffe0a22bc9eba60eaaa/fs_rclonefs-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b323cf9600f3a518aba86ca7c16b7c0b755270475b8f5aba69ed2f23526bc53",
                "md5": "d9fbfc83a5db53dc9394e27107faf8c1",
                "sha256": "93da741ab8c256bf9f680895f422a4edc23dc6008fab51688c0084c51e0d1e78"
            },
            "downloads": -1,
            "filename": "fs_rclonefs-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d9fbfc83a5db53dc9394e27107faf8c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 25144,
            "upload_time": "2024-08-04T05:03:15",
            "upload_time_iso_8601": "2024-08-04T05:03:15.103368Z",
            "url": "https://files.pythonhosted.org/packages/2b/32/3cf9600f3a518aba86ca7c16b7c0b755270475b8f5aba69ed2f23526bc53/fs_rclonefs-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 05:03:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "element0",
    "github_project": "fs.rclonefs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fs.rclonefs"
}
        
Elapsed time: 0.29157s