{"id":13815086,"url":"https://github.com/Johannes11833/rclone_python","last_synced_at":"2025-05-15T07:31:54.026Z","repository":{"id":57750946,"uuid":"525987168","full_name":"Johannes11833/rclone_python","owner":"Johannes11833","description":"rclone python wrapper","archived":false,"fork":false,"pushed_at":"2025-05-05T02:07:20.000Z","size":751,"stargazers_count":159,"open_issues_count":13,"forks_count":29,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T03:23:15.832Z","etag":null,"topics":["cloud","python","rclone","sync","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Johannes11833.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-17T23:34:36.000Z","updated_at":"2025-05-05T02:07:23.000Z","dependencies_parsed_at":"2023-01-23T17:05:17.581Z","dependency_job_id":"b1e96f6e-8c92-4269-8295-b9311c305478","html_url":"https://github.com/Johannes11833/rclone_python","commit_stats":{"total_commits":88,"total_committers":6,"mean_commits":"14.666666666666666","dds":0.1477272727272727,"last_synced_commit":"4f232b96de85f95e53532ecd6fc69a674de48d99"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johannes11833%2Frclone_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johannes11833%2Frclone_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johannes11833%2Frclone_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johannes11833%2Frclone_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Johannes11833","download_url":"https://codeload.github.com/Johannes11833/rclone_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254295941,"owners_count":22047173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","python","rclone","sync","wrapper"],"created_at":"2024-08-04T04:02:56.349Z","updated_at":"2025-05-15T07:31:54.018Z","avatar_url":"https://github.com/Johannes11833.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![PyPI version](https://badge.fury.io/py/rclone-python.svg)](https://badge.fury.io/py/rclone-python)\n\n# rclone-python ☁️\n\nA python wrapper for rclone that makes rclone's functionality usable in python.\nrclone needs to be installed on the system for the wrapper to work.\n\n![demo gif](https://raw.githubusercontent.com/Johannes11833/rclone_python/master/demo/demo.gif)\n\n## Features ⚒️\n\n- Copy, move and sync files between remotes\n- Delete and prune files/directories\n- List files in a directory including properties of the files.\n- List available remotes.\n- Generate hashes from files or validate them with their hashsum.\n- Create new remotes\n- Check available remotes\n- Create and manage public links.\n- Check the currently installed rclone versions and if updates are available.\n\n## Installation 💾\n\n_rclone_python_ can be installed using pip\n\n```shell\npip install rclone-python\n```\n\nor by cloning this repository and running from within the root of the project\n\n```shell\npip install .\n```\n\n## How to use 💡\n\nAll functionally of this wrapper is accessible through `rclone`.\nThe following example checks if rclone is installed.\n\n```python\nfrom rclone_python import rclone\n\nprint(rclone.is_installed())\n```\n\n```console\nTrue\n```\n### Create new remote\n\nCreate a new rclone remote connection with rclone's default client-id and client-secret.\n\n```python\nfrom rclone_python import rclone\nfrom rclone_python.remote_types import RemoteTypes\n\nrclone.create_remote('onedrive', RemoteTypes.onedrive)\n```\n\nAdditionally, client-id and client-secret can be used with many cloud providers.\n\n```python\nfrom rclone_python import rclone\nfrom rclone_python.remote_types import RemoteTypes\n\nrclone.create_remote('onedrive', RemoteTypes.onedrive, client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET')\n```\n\n### Copy\n\n```python\nfrom rclone_python import rclone\n\n# copy all file in the test_dir on OneDrive to the local data folder.\nrclone.copy('onedrive:data', 'data', ignore_existing=True, args=['--create-empty-src-dirs'])\n```\n\n\n```console\nCopying onedrive:data to data ⠸ ━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━  47% 110.0/236.5 MiB 0:00:04\n ├─video1.webm                ⠸ ━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━  31% 24.4/78.8 MiB   0:00:06\n ├─video2.webm                ⠸ ━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━  45% 35.5/78.8 MiB   0:00:03\n └─video3.webm                ⠸ ━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━  35% 27.6/78.8 MiB   0:00:05\n```\n\n### Delete\n\nDelete a file or a directory. When deleting a directory, only the files in the directory (and all it's subdirectories)\nare deleted, but the folders remain.\n\n```python\nfrom rclone_python import rclone\n\n# delete a specific file on onedrive\nrclone.delete('onedrive:data/video1.mp4')\n\n```\n\n### Prune\n\n```python\nfrom rclone_python import rclone\n\n# remove the entire test_dir folder (and all files contained in it and it's subdirectories) on onedrive\nrclone.purge('onedrive:test_dir')\n```\n\n### Get Hash\n```python\nfrom rclone_python import rclone\nfrom rclone_python.hash_types import HashTypes\n\nprint(rclone.hash(HashTypes.sha1, \"box:data\")\n```\n```console\n{'video1.webm': '3ef08d895f25e8b7d84d3a1ac58f8f302e33058b', 'video3.webm': '3ef08d895f25e8b7d84d3a1ac58f8f302e33058b', 'video2.webm': '3ef08d895f25e8b7d84d3a1ac58f8f302e33058b'}\n```\n\n### Check\nChecks the files in the source and destination match.\n  - \"=\" path means path was found in source and destination and was identical\n  - \"-\" path means path was missing on the source, so only in the destination\n  - \"+\" path means path was missing on the destination, so only in the source\n  - \"*\" path means path was present in source and destination but different.\n  - \"!\" path means there was an error reading or hashing the source or dest.\n```python\nfrom rclone_python import rclone\n\nprint(rclone.check(\"data\", \"box:data\"))\n```\n```console\n(False, [('*', 'video1.webm'), ('=', 'video2.webm'), ('=', 'video2.webm')])\n```\n\n## Custom Progressbar\nYou can use your own rich progressbar with all transfer operations.\nThis allows you to customize the columns to be displayed.\nA list of all rich-progress columns can be found [here](https://rich.readthedocs.io/en/stable/progress.html#columns).\n\n```python\nfrom rclone_python import rclone\n\nfrom rich.progress import (\n    Progress,\n    TextColumn,\n    BarColumn,\n    TaskProgressColumn,\n    TransferSpeedColumn,\n)\n\npbar = Progress(\n    TextColumn(\"[progress.description]{task.description}\"),\n    BarColumn(),\n    TaskProgressColumn(),\n    TransferSpeedColumn(),\n)\nrclone.copy(\"data\", \"box:rclone_test/data1\", pbar=pbar)\n```\n\n```console\nCopying data to data1 ━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  17% 5.3 MB/s                                                                                                            \n ├─video1.mp4         ━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━  38% 4.2 MB/s                                                                                                            \n ├─video2.mp4         ━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   5% 1.6 MB/s\n └─another.mp4        ━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   4% 1.4 MB/s\n```\n\n## Set the log level\nThe log level can be set using: \n```python\nrclone.set_log_level(logging.DEBUG)\n```\nThis will make the wrapper print the raw rclone progress. \n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Johannes11833/rclone_python\u0026type=Date)](https://star-history.com/#Johannes11833/rclone_python\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohannes11833%2Frclone_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJohannes11833%2Frclone_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohannes11833%2Frclone_python/lists"}