An open API service indexing awesome lists of open source software.

https://github.com/zincware/rclone-filesystem


https://github.com/zincware/rclone-filesystem

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# RCloneFileSystem: fsspec-Compatible Filesystem via rclone

This package provides a fsspec compliant filesystem interface for rclone.

Given an rclone remove `rclone config create myremote s3 ...` you can use the `RCloneFileSystem` as follows:

```py
from rclone_filesystem import RCloneFileSystem

fs = RCloneFileSystem(remote="myremote")

fs.ls("data") # path, e.g. bucket name for S3

with fs.open("data/test-file.txt", "wb") as f:
f.write(b"Hello, World!")

with fs.open("data/test-file.txt", "rb") as f:
content = f.read()
assert content == b"Hello, World!"
```