rclone-api 1.5.3__tar.gz → 1.5.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. {rclone_api-1.5.3 → rclone_api-1.5.4}/PKG-INFO +133 -114
  2. {rclone_api-1.5.3 → rclone_api-1.5.4}/README.md +132 -113
  3. {rclone_api-1.5.3 → rclone_api-1.5.4}/pyproject.toml +1 -1
  4. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/__init__.py +18 -18
  5. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/rclone_impl.py +34 -34
  6. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/PKG-INFO +133 -114
  7. {rclone_api-1.5.3 → rclone_api-1.5.4}/.aiderignore +0 -0
  8. {rclone_api-1.5.3 → rclone_api-1.5.4}/.github/workflows/lint.yml +0 -0
  9. {rclone_api-1.5.3 → rclone_api-1.5.4}/.github/workflows/push_macos.yml +0 -0
  10. {rclone_api-1.5.3 → rclone_api-1.5.4}/.github/workflows/push_ubuntu.yml +0 -0
  11. {rclone_api-1.5.3 → rclone_api-1.5.4}/.github/workflows/push_win.yml +0 -0
  12. {rclone_api-1.5.3 → rclone_api-1.5.4}/.gitignore +0 -0
  13. {rclone_api-1.5.3 → rclone_api-1.5.4}/.pylintrc +0 -0
  14. {rclone_api-1.5.3 → rclone_api-1.5.4}/.vscode/launch.json +0 -0
  15. {rclone_api-1.5.3 → rclone_api-1.5.4}/.vscode/settings.json +0 -0
  16. {rclone_api-1.5.3 → rclone_api-1.5.4}/.vscode/tasks.json +0 -0
  17. {rclone_api-1.5.3 → rclone_api-1.5.4}/LICENSE +0 -0
  18. {rclone_api-1.5.3 → rclone_api-1.5.4}/MANIFEST.in +0 -0
  19. {rclone_api-1.5.3 → rclone_api-1.5.4}/clean +0 -0
  20. {rclone_api-1.5.3 → rclone_api-1.5.4}/install +0 -0
  21. {rclone_api-1.5.3 → rclone_api-1.5.4}/lint +0 -0
  22. {rclone_api-1.5.3 → rclone_api-1.5.4}/requirements.testing.txt +0 -0
  23. {rclone_api-1.5.3 → rclone_api-1.5.4}/setup.cfg +0 -0
  24. {rclone_api-1.5.3 → rclone_api-1.5.4}/setup.py +0 -0
  25. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/assets/example.txt +0 -0
  26. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cli.py +0 -0
  27. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cmd/analyze.py +0 -0
  28. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cmd/copy_large_s3.py +0 -0
  29. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cmd/copy_large_s3_finish.py +0 -0
  30. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cmd/list_files.py +0 -0
  31. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/cmd/save_to_db.py +0 -0
  32. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/completed_process.py +0 -0
  33. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/config.py +0 -0
  34. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/convert.py +0 -0
  35. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/db/__init__.py +0 -0
  36. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/db/db.py +0 -0
  37. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/db/models.py +0 -0
  38. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/deprecated.py +0 -0
  39. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/detail/copy_file_parts_resumable.py +0 -0
  40. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/detail/walk.py +0 -0
  41. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/diff.py +0 -0
  42. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/dir.py +0 -0
  43. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/dir_listing.py +0 -0
  44. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/exec.py +0 -0
  45. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/experimental/flags.py +0 -0
  46. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/experimental/flags_base.py +0 -0
  47. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/file.py +0 -0
  48. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/file_item.py +0 -0
  49. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/file_part.py +0 -0
  50. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/file_stream.py +0 -0
  51. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/filelist.py +0 -0
  52. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/group_files.py +0 -0
  53. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/http_server.py +0 -0
  54. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/install.py +0 -0
  55. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/log.py +0 -0
  56. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/mount.py +0 -0
  57. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/process.py +0 -0
  58. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/remote.py +0 -0
  59. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/rpath.py +0 -0
  60. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/api.py +0 -0
  61. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/basic_ops.py +0 -0
  62. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/chunk_task.py +0 -0
  63. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/create.py +0 -0
  64. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/file_info.py +0 -0
  65. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/finished_piece.py +0 -0
  66. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/info_json.py +0 -0
  67. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/merge_state.py +0 -0
  68. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/upload_info.py +0 -0
  69. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/upload_parts_inline.py +0 -0
  70. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/upload_parts_resumable.py +0 -0
  71. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/upload_parts_server_side_merge.py +0 -0
  72. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/multipart/upload_state.py +0 -0
  73. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/s3/types.py +0 -0
  74. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/scan_missing_folders.py +0 -0
  75. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/types.py +0 -0
  76. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api/util.py +0 -0
  77. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/SOURCES.txt +0 -0
  78. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/dependency_links.txt +0 -0
  79. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/entry_points.txt +0 -0
  80. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/requires.txt +0 -0
  81. {rclone_api-1.5.3 → rclone_api-1.5.4}/src/rclone_api.egg-info/top_level.txt +0 -0
  82. {rclone_api-1.5.3 → rclone_api-1.5.4}/test +0 -0
  83. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/archive/test_paramiko.py.disabled +0 -0
  84. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_cmd_list_files.py +0 -0
  85. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_copy.py +0 -0
  86. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_copy_bytes.py +0 -0
  87. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_copy_file_resumable_s3.py +0 -0
  88. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_copy_files.py +0 -0
  89. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_db.py +0 -0
  90. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_diff.py +0 -0
  91. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_file_item.py +0 -0
  92. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_group_files.py +0 -0
  93. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_install.py +0 -0
  94. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_is_synced.py +0 -0
  95. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_ls.py +0 -0
  96. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_ls_stream_files.py +0 -0
  97. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_mount.py +0 -0
  98. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_mount_s3.py +0 -0
  99. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_obscure.py +0 -0
  100. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_rclone_config.py +0 -0
  101. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_read_write_text.py +0 -0
  102. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_remote_control.py +0 -0
  103. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_remotes.py +0 -0
  104. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_s3.py +0 -0
  105. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_scan_missing_folders.py +0 -0
  106. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_serve_http.py +0 -0
  107. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_size_files.py +0 -0
  108. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_size_suffix.py +0 -0
  109. {rclone_api-1.5.3 → rclone_api-1.5.4}/tests/test_walk.py +0 -0
  110. {rclone_api-1.5.3 → rclone_api-1.5.4}/tox.ini +0 -0
  111. {rclone_api-1.5.3 → rclone_api-1.5.4}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.5.3
3
+ Version: 1.5.4
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  License: BSD 3-Clause License
@@ -99,22 +99,41 @@ def test_ls_glob_png(self) -> None:
99
99
  ## API
100
100
 
101
101
  ```python
102
+
102
103
  class Rclone:
103
104
  """
104
105
  Main interface for interacting with Rclone.
105
-
106
+
106
107
  This class provides methods for all major Rclone operations including
107
108
  file transfers, listing, mounting, and remote management.
108
-
109
+
109
110
  It serves as the primary entry point for the API, wrapping the underlying
110
111
  implementation details and providing a clean, consistent interface.
111
112
  """
113
+
114
+ @staticmethod
115
+ def upgrade_rclone() -> Path:
116
+ """
117
+ Upgrade the rclone executable to the latest version.
118
+
119
+ Downloads the latest rclone binary and replaces the current one.
120
+
121
+ If an external rclone is already in your path then although upgrade_rclone
122
+ will download the latest version, it will not affect the rclone selected.
123
+
124
+ Returns:
125
+ Path to the upgraded rclone executable
126
+ """
127
+ from rclone_api.util import upgrade_rclone
128
+
129
+ return upgrade_rclone()
130
+
112
131
  def __init__(
113
132
  self, rclone_conf: Path | Config, rclone_exe: Path | None = None
114
133
  ) -> None:
115
134
  """
116
135
  Initialize the Rclone interface.
117
-
136
+
118
137
  Args:
119
138
  rclone_conf: Path to rclone config file or Config object
120
139
  rclone_exe: Optional path to rclone executable. If None, will search in PATH.
@@ -126,12 +145,12 @@ class Rclone:
126
145
  def webgui(self, other_args: list[str] | None = None) -> Process:
127
146
  """
128
147
  Launch the Rclone web GUI.
129
-
148
+
130
149
  Starts the built-in web interface for interacting with rclone.
131
-
150
+
132
151
  Args:
133
152
  other_args: Additional command-line arguments to pass to rclone
134
-
153
+
135
154
  Returns:
136
155
  Process object representing the running web GUI
137
156
  """
@@ -146,15 +165,15 @@ class Rclone:
146
165
  ) -> Process:
147
166
  """
148
167
  Launch the Rclone server so it can receive commands.
149
-
168
+
150
169
  Starts an rclone server that can be controlled remotely.
151
-
170
+
152
171
  Args:
153
172
  addr: Address and port to listen on (e.g., "localhost:5572")
154
173
  user: Optional username for authentication
155
174
  password: Optional password for authentication
156
175
  other_args: Additional command-line arguments
157
-
176
+
158
177
  Returns:
159
178
  Process object representing the running server
160
179
  """
@@ -172,14 +191,14 @@ class Rclone:
172
191
  ) -> CompletedProcess:
173
192
  """
174
193
  Send commands to a running rclone server.
175
-
194
+
176
195
  Args:
177
196
  addr: Address of the rclone server (e.g., "localhost:5572")
178
197
  user: Optional username for authentication
179
198
  password: Optional password for authentication
180
199
  capture: Whether to capture and return command output
181
200
  other_args: Additional command-line arguments
182
-
201
+
183
202
  Returns:
184
203
  CompletedProcess containing the command result
185
204
  """
@@ -194,13 +213,13 @@ class Rclone:
194
213
  def obscure(self, password: str) -> str:
195
214
  """
196
215
  Obscure a password for use in rclone config files.
197
-
216
+
198
217
  Converts a plaintext password to rclone's obscured format.
199
218
  Note that this is not secure encryption, just light obfuscation.
200
-
219
+
201
220
  Args:
202
221
  password: The plaintext password to obscure
203
-
222
+
204
223
  Returns:
205
224
  The obscured password string
206
225
  """
@@ -208,25 +227,25 @@ class Rclone:
208
227
 
209
228
  def ls_stream(
210
229
  self,
211
- path: str,
230
+ src: str,
212
231
  max_depth: int = -1,
213
232
  fast_list: bool = False,
214
233
  ) -> FilesStream:
215
234
  """
216
235
  List files in the given path as a stream of results.
217
-
236
+
218
237
  This method is memory-efficient for large directories as it yields
219
238
  results incrementally rather than collecting them all at once.
220
-
239
+
221
240
  Args:
222
- path: Remote path to list
241
+ src: Remote path to list
223
242
  max_depth: Maximum recursion depth (-1 for unlimited)
224
243
  fast_list: Use fast list (only recommended for listing entire repositories or small datasets)
225
-
244
+
226
245
  Returns:
227
246
  A stream of file entries that can be iterated over
228
247
  """
229
- return self.impl.ls_stream(path=path, max_depth=max_depth, fast_list=fast_list)
248
+ return self.impl.ls_stream(src=src, max_depth=max_depth, fast_list=fast_list)
230
249
 
231
250
  def save_to_db(
232
251
  self,
@@ -237,10 +256,10 @@ class Rclone:
237
256
  ) -> None:
238
257
  """
239
258
  Save files to a database (sqlite, mysql, postgres).
240
-
259
+
241
260
  Lists all files in the source path and stores their metadata in a database.
242
261
  Useful for creating searchable indexes of remote storage.
243
-
262
+
244
263
  Args:
245
264
  src: Remote path to list, this will be used to populate an entire table, so always use the root-most path.
246
265
  db_url: Database URL, like sqlite:///data.db or mysql://user:pass@localhost/db or postgres://user:pass@localhost/db
@@ -253,7 +272,7 @@ class Rclone:
253
272
 
254
273
  def ls(
255
274
  self,
256
- path: Dir | Remote | str | None = None,
275
+ src: Dir | Remote | str | None = None,
257
276
  max_depth: int | None = None,
258
277
  glob: str | None = None,
259
278
  order: Order = Order.NORMAL,
@@ -261,21 +280,21 @@ class Rclone:
261
280
  ) -> DirListing:
262
281
  """
263
282
  List files and directories at the specified path.
264
-
283
+
265
284
  Provides a detailed listing with file metadata.
266
-
285
+
267
286
  Args:
268
- path: Path to list (Dir, Remote, or string path)
287
+ src: Path to list (Dir, Remote, or string path)
269
288
  max_depth: Maximum recursion depth (None for default)
270
289
  glob: Optional glob pattern to filter results
271
290
  order: Sorting order for the results
272
291
  listing_option: What types of entries to include
273
-
292
+
274
293
  Returns:
275
294
  DirListing object containing the results
276
295
  """
277
296
  return self.impl.ls(
278
- path=path,
297
+ src=src,
279
298
  max_depth=max_depth,
280
299
  glob=glob,
281
300
  order=order,
@@ -285,9 +304,9 @@ class Rclone:
285
304
  def listremotes(self) -> list[Remote]:
286
305
  """
287
306
  List all configured remotes.
288
-
307
+
289
308
  Returns a list of all remotes defined in the rclone configuration.
290
-
309
+
291
310
  Returns:
292
311
  List of Remote objects
293
312
  """
@@ -311,10 +330,10 @@ class Rclone:
311
330
  ) -> Generator[DiffItem, None, None]:
312
331
  """
313
332
  Compare two directories and yield differences.
314
-
333
+
315
334
  Be extra careful with the src and dst values. If you are off by one
316
335
  parent directory, you will get a huge amount of false diffs.
317
-
336
+
318
337
  Args:
319
338
  src: Rclone style src path
320
339
  dst: Rclone style dst path
@@ -325,7 +344,7 @@ class Rclone:
325
344
  size_only: Compare only file sizes, not content
326
345
  checkers: Number of checker threads
327
346
  other_args: Additional command-line arguments
328
-
347
+
329
348
  Yields:
330
349
  DiffItem objects representing each difference found
331
350
  """
@@ -343,28 +362,28 @@ class Rclone:
343
362
 
344
363
  def walk(
345
364
  self,
346
- path: Dir | Remote | str,
365
+ src: Dir | Remote | str,
347
366
  max_depth: int = -1,
348
367
  breadth_first: bool = True,
349
368
  order: Order = Order.NORMAL,
350
369
  ) -> Generator[DirListing, None, None]:
351
370
  """
352
371
  Walk through the given path recursively, yielding directory listings.
353
-
372
+
354
373
  Similar to os.walk(), but for remote storage. Traverses directories
355
374
  and yields their contents.
356
-
375
+
357
376
  Args:
358
- path: Remote path, Dir, or Remote object to walk through
377
+ src: Remote path, Dir, or Remote object to walk through
359
378
  max_depth: Maximum depth to traverse (-1 for unlimited)
360
379
  breadth_first: If True, use breadth-first traversal, otherwise depth-first
361
380
  order: Sorting order for directory entries
362
-
381
+
363
382
  Yields:
364
383
  DirListing: Directory listing for each directory encountered
365
384
  """
366
385
  return self.impl.walk(
367
- path=path, max_depth=max_depth, breadth_first=breadth_first, order=order
386
+ src=src, max_depth=max_depth, breadth_first=breadth_first, order=order
368
387
  )
369
388
 
370
389
  def scan_missing_folders(
@@ -376,16 +395,16 @@ class Rclone:
376
395
  ) -> Generator[Dir, None, None]:
377
396
  """
378
397
  Find folders that exist in source but are missing in destination.
379
-
398
+
380
399
  Useful for identifying directories that need to be created before
381
400
  copying files.
382
-
401
+
383
402
  Args:
384
403
  src: Source directory or Remote to scan
385
404
  dst: Destination directory or Remote to compare against
386
405
  max_depth: Maximum depth to traverse (-1 for unlimited)
387
406
  order: Sorting order for directory entries
388
-
407
+
389
408
  Yields:
390
409
  Dir: Each directory that exists in source but not in destination
391
410
  """
@@ -394,21 +413,21 @@ class Rclone:
394
413
  )
395
414
 
396
415
  def cleanup(
397
- self, path: str, other_args: list[str] | None = None
416
+ self, src: str, other_args: list[str] | None = None
398
417
  ) -> CompletedProcess:
399
418
  """
400
419
  Cleanup any resources used by the Rclone instance.
401
-
420
+
402
421
  Removes temporary files and directories created by rclone.
403
-
422
+
404
423
  Args:
405
- path: Path to clean up
424
+ src: Path to clean up
406
425
  other_args: Additional command-line arguments
407
-
426
+
408
427
  Returns:
409
428
  CompletedProcess with the result of the cleanup operation
410
429
  """
411
- return self.impl.cleanup(path=path, other_args=other_args)
430
+ return self.impl.cleanup(src=src, other_args=other_args)
412
431
 
413
432
  def copy_to(
414
433
  self,
@@ -420,17 +439,17 @@ class Rclone:
420
439
  ) -> CompletedProcess:
421
440
  """
422
441
  Copy one file from source to destination.
423
-
442
+
424
443
  Warning - this can be slow for large files or when copying between
425
444
  different storage providers.
426
-
445
+
427
446
  Args:
428
447
  src: Rclone style src path
429
448
  dst: Rclone style dst path
430
449
  check: Whether to verify the copy with checksums
431
450
  verbose: Whether to show detailed progress
432
451
  other_args: Additional command-line arguments
433
-
452
+
434
453
  Returns:
435
454
  CompletedProcess with the result of the copy operation
436
455
  """
@@ -459,9 +478,9 @@ class Rclone:
459
478
  ) -> list[CompletedProcess]:
460
479
  """
461
480
  Copy multiple files from source to destination.
462
-
481
+
463
482
  Efficiently copies a list of files, potentially in parallel.
464
-
483
+
465
484
  Args:
466
485
  src: Rclone style src path
467
486
  dst: Rclone style dst path
@@ -479,7 +498,7 @@ class Rclone:
479
498
  max_partition_workers: Maximum number of partition workers
480
499
  multi_thread_streams: Number of streams for multi-thread copy
481
500
  other_args: Additional command-line arguments
482
-
501
+
483
502
  Returns:
484
503
  List of CompletedProcess objects for each copy operation
485
504
  """
@@ -516,9 +535,9 @@ class Rclone:
516
535
  ) -> CompletedProcess:
517
536
  """
518
537
  Copy files from source to destination.
519
-
538
+
520
539
  Recursively copies all files from src to dst.
521
-
540
+
522
541
  Args:
523
542
  src: Rclone style src path
524
543
  dst: Rclone style dst path
@@ -529,7 +548,7 @@ class Rclone:
529
548
  low_level_retries: Number of low-level retries
530
549
  retries: Number of high-level retries
531
550
  other_args: Additional command-line arguments
532
-
551
+
533
552
  Returns:
534
553
  CompletedProcess with the result of the copy operation
535
554
  """
@@ -545,19 +564,19 @@ class Rclone:
545
564
  other_args=other_args,
546
565
  )
547
566
 
548
- def purge(self, path: Dir | str) -> CompletedProcess:
567
+ def purge(self, src: Dir | str) -> CompletedProcess:
549
568
  """
550
569
  Purge a directory.
551
-
570
+
552
571
  Removes a directory and all its contents.
553
-
572
+
554
573
  Args:
555
- path: Rclone style path
556
-
574
+ src: Rclone style path
575
+
557
576
  Returns:
558
577
  CompletedProcess with the result of the purge operation
559
578
  """
560
- return self.impl.purge(path=path)
579
+ return self.impl.purge(src=src)
561
580
 
562
581
  def delete_files(
563
582
  self,
@@ -570,7 +589,7 @@ class Rclone:
570
589
  ) -> CompletedProcess:
571
590
  """
572
591
  Delete files or directories.
573
-
592
+
574
593
  Args:
575
594
  files: Files to delete (single file/path or list)
576
595
  check: Whether to verify deletions
@@ -578,7 +597,7 @@ class Rclone:
578
597
  verbose: Whether to show detailed progress
579
598
  max_partition_workers: Maximum number of partition workers
580
599
  other_args: Additional command-line arguments
581
-
600
+
582
601
  Returns:
583
602
  CompletedProcess with the result of the delete operation
584
603
  """
@@ -591,28 +610,28 @@ class Rclone:
591
610
  other_args=other_args,
592
611
  )
593
612
 
594
- def exists(self, path: Dir | Remote | str | File) -> bool:
613
+ def exists(self, src: Dir | Remote | str | File) -> bool:
595
614
  """
596
615
  Check if a file or directory exists.
597
-
616
+
598
617
  Args:
599
- path: Path to check (Dir, Remote, File, or path string)
600
-
618
+ src: Path to check (Dir, Remote, File, or path string)
619
+
601
620
  Returns:
602
621
  True if the path exists, False otherwise
603
622
  """
604
- return self.impl.exists(path=path)
623
+ return self.impl.exists(src=src)
605
624
 
606
625
  def is_synced(self, src: str | Dir, dst: str | Dir) -> bool:
607
626
  """
608
627
  Check if two directories are in sync.
609
-
628
+
610
629
  Compares the contents of src and dst to determine if they match.
611
-
630
+
612
631
  Args:
613
632
  src: Source directory (Dir object or path string)
614
633
  dst: Destination directory (Dir object or path string)
615
-
634
+
616
635
  Returns:
617
636
  True if the directories are in sync, False otherwise
618
637
  """
@@ -621,10 +640,10 @@ class Rclone:
621
640
  def modtime(self, src: str) -> str | Exception:
622
641
  """
623
642
  Get the modification time of a file or directory.
624
-
643
+
625
644
  Args:
626
645
  src: Path to the file or directory
627
-
646
+
628
647
  Returns:
629
648
  Modification time as a string, or Exception if an error occurred
630
649
  """
@@ -633,10 +652,10 @@ class Rclone:
633
652
  def modtime_dt(self, src: str) -> datetime | Exception:
634
653
  """
635
654
  Get the modification time of a file or directory as a datetime object.
636
-
655
+
637
656
  Args:
638
657
  src: Path to the file or directory
639
-
658
+
640
659
  Returns:
641
660
  Modification time as a datetime object, or Exception if an error occurred
642
661
  """
@@ -649,13 +668,13 @@ class Rclone:
649
668
  ) -> Exception | None:
650
669
  """
651
670
  Write text to a file.
652
-
671
+
653
672
  Creates or overwrites the file at dst with the given text.
654
-
673
+
655
674
  Args:
656
675
  text: Text content to write
657
676
  dst: Destination file path
658
-
677
+
659
678
  Returns:
660
679
  None if successful, Exception if an error occurred
661
680
  """
@@ -668,13 +687,13 @@ class Rclone:
668
687
  ) -> Exception | None:
669
688
  """
670
689
  Write bytes to a file.
671
-
690
+
672
691
  Creates or overwrites the file at dst with the given binary data.
673
-
692
+
674
693
  Args:
675
694
  data: Binary content to write
676
695
  dst: Destination file path
677
-
696
+
678
697
  Returns:
679
698
  None if successful, Exception if an error occurred
680
699
  """
@@ -683,10 +702,10 @@ class Rclone:
683
702
  def read_bytes(self, src: str) -> bytes | Exception:
684
703
  """
685
704
  Read bytes from a file.
686
-
705
+
687
706
  Args:
688
707
  src: Source file path
689
-
708
+
690
709
  Returns:
691
710
  File contents as bytes, or Exception if an error occurred
692
711
  """
@@ -695,10 +714,10 @@ class Rclone:
695
714
  def read_text(self, src: str) -> str | Exception:
696
715
  """
697
716
  Read text from a file.
698
-
717
+
699
718
  Args:
700
719
  src: Source file path
701
-
720
+
702
721
  Returns:
703
722
  File contents as a string, or Exception if an error occurred
704
723
  """
@@ -714,16 +733,16 @@ class Rclone:
714
733
  ) -> Exception | None:
715
734
  """
716
735
  Copy a slice of bytes from the src file to dst.
717
-
736
+
718
737
  Extracts a portion of a file based on offset and length.
719
-
738
+
720
739
  Args:
721
740
  src: Source file path
722
741
  offset: Starting position in the source file
723
742
  length: Number of bytes to copy
724
743
  outfile: Local file path to write the bytes to
725
744
  other_args: Additional command-line arguments
726
-
745
+
727
746
  Returns:
728
747
  None if successful, Exception if an error occurred
729
748
  """
@@ -740,14 +759,14 @@ class Rclone:
740
759
  ) -> CompletedProcess:
741
760
  """
742
761
  Copy a directory from source to destination.
743
-
762
+
744
763
  Recursively copies all files and subdirectories.
745
-
764
+
746
765
  Args:
747
766
  src: Source directory (Dir object or path string)
748
767
  dst: Destination directory (Dir object or path string)
749
768
  args: Additional command-line arguments
750
-
769
+
751
770
  Returns:
752
771
  CompletedProcess with the result of the copy operation
753
772
  """
@@ -759,14 +778,14 @@ class Rclone:
759
778
  ) -> CompletedProcess:
760
779
  """
761
780
  Copy a remote to another remote.
762
-
781
+
763
782
  Copies all contents from one remote storage to another.
764
-
783
+
765
784
  Args:
766
785
  src: Source remote
767
786
  dst: Destination remote
768
787
  args: Additional command-line arguments
769
-
788
+
770
789
  Returns:
771
790
  CompletedProcess with the result of the copy operation
772
791
  """
@@ -782,20 +801,20 @@ class Rclone:
782
801
  ) -> Exception | None:
783
802
  """
784
803
  Copy a large file to S3 with resumable upload capability.
785
-
804
+
786
805
  This method splits the file into parts for parallel upload and can
787
806
  resume interrupted transfers using a custom algorithm in python.
788
-
807
+
789
808
  Particularly useful for very large files where network interruptions
790
809
  are likely.
791
-
810
+
792
811
  Args:
793
812
  src: Source file path (format: remote:bucket/path/file)
794
813
  dst: Destination file path (format: remote:bucket/path/file)
795
814
  part_infos: Optional list of part information for resuming uploads
796
815
  upload_threads: Number of parallel upload threads
797
816
  merge_threads: Number of threads for merging uploaded parts
798
-
817
+
799
818
  Returns:
800
819
  None if successful, Exception if an error occurred
801
820
  """
@@ -822,9 +841,9 @@ class Rclone:
822
841
  ) -> Mount:
823
842
  """
824
843
  Mount a remote or directory to a local path.
825
-
844
+
826
845
  Makes remote storage accessible as a local filesystem.
827
-
846
+
828
847
  Args:
829
848
  src: Remote or directory to mount
830
849
  outdir: Local path to mount to
@@ -836,7 +855,7 @@ class Rclone:
836
855
  cache_dir_delete_on_exit: Whether to delete cache on exit
837
856
  log: Path to write logs to
838
857
  other_args: Additional command-line arguments
839
-
858
+
840
859
  Returns:
841
860
  Mount object representing the mounted filesystem
842
861
  """
@@ -861,19 +880,19 @@ class Rclone:
861
880
  ) -> HttpServer:
862
881
  """
863
882
  Serve a remote or directory via HTTP.
864
-
883
+
865
884
  Creates an HTTP server that provides access to the specified remote.
866
885
  The returned HttpServer object includes a client for fetching files.
867
-
886
+
868
887
  This is useful for providing web access to remote storage or for
869
888
  accessing remote files from applications that support HTTP but not
870
889
  the remote's native protocol.
871
-
890
+
872
891
  Args:
873
892
  src: Remote or directory to serve
874
893
  addr: Network address and port to serve on (default: localhost:8080)
875
894
  other_args: Additional arguments to pass to rclone
876
-
895
+
877
896
  Returns:
878
897
  HttpServer object with methods for accessing the served content
879
898
  """
@@ -890,9 +909,9 @@ class Rclone:
890
909
  ) -> SizeResult | Exception:
891
910
  """
892
911
  Get the size of a list of files.
893
-
912
+
894
913
  Calculates the total size of the specified files.
895
-
914
+
896
915
  Args:
897
916
  src: Base path for the files
898
917
  files: List of file paths relative to src
@@ -900,10 +919,10 @@ class Rclone:
900
919
  other_args: Additional command-line arguments
901
920
  check: Whether to verify file integrity
902
921
  verbose: Whether to show detailed output
903
-
922
+
904
923
  Returns:
905
924
  SizeResult with size information, or Exception if an error occurred
906
-
925
+
907
926
  Example:
908
927
  size_files("remote:bucket", ["path/to/file1", "path/to/file2"])
909
928
  """
@@ -919,10 +938,10 @@ class Rclone:
919
938
  def size_file(self, src: str) -> SizeSuffix | Exception:
920
939
  """
921
940
  Get the size of a file.
922
-
941
+
923
942
  Args:
924
943
  src: Path to the file
925
-
944
+
926
945
  Returns:
927
946
  SizeSuffix object representing the file size, or Exception if an error occurred
928
947
  """