rclone-api 1.0.24__py2.py3-none-any.whl → 1.0.26__py2.py3-none-any.whl

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.
rclone_api/rclone.py CHANGED
@@ -345,14 +345,23 @@ class Rclone:
345
345
  self,
346
346
  url: str,
347
347
  outdir: Path,
348
+ allow_writes=False,
348
349
  vfs_cache_mode="full",
349
- transfers: int | None = 16,
350
+ # dir-cache-time
351
+ dir_cache_time: str | None = "1h",
352
+ attribute_timeout: str | None = "1h",
353
+ # --vfs-cache-max-size
354
+ # vfs-cache-max-size
355
+ vfs_disk_space_total_size: str | None = "100M",
356
+ transfers: int | None = 128,
350
357
  modtime_strategy: (
351
358
  ModTimeStrategy | None
352
359
  ) = ModTimeStrategy.USE_SERVER_MODTIME, # speeds up S3 operations
353
360
  vfs_read_chunk_streams: int | None = 16,
354
361
  vfs_read_chunk_size: str | None = "4M",
355
362
  vfs_fast_fingerprint: bool = True,
363
+ # vfs-refresh
364
+ vfs_refresh: bool = True,
356
365
  other_cmds: list[str] | None = None,
357
366
  ) -> Process:
358
367
  """Mount a remote or directory to a local path.
@@ -365,10 +374,24 @@ class Rclone:
365
374
  if modtime_strategy is not None:
366
375
  other_cmds.append(f"--{modtime_strategy.value}")
367
376
  if (vfs_cache_mode == "full" or vfs_cache_mode == "writes") and (
368
- transfers is not None
377
+ transfers is not None and "--transfers" not in other_cmds
369
378
  ):
370
379
  other_cmds.append("--transfers")
371
380
  other_cmds.append(str(transfers))
381
+ if dir_cache_time is not None and "--dir-cache-time" not in other_cmds:
382
+ other_cmds.append("--dir-cache-time")
383
+ other_cmds.append(dir_cache_time)
384
+ if (
385
+ vfs_disk_space_total_size is not None
386
+ and "--vfs-cache-max-size" not in other_cmds
387
+ ):
388
+ other_cmds.append("--vfs-cache-max-size")
389
+ other_cmds.append(vfs_disk_space_total_size)
390
+ if vfs_refresh and "--vfs-refresh" not in other_cmds:
391
+ other_cmds.append("--vfs-refresh")
392
+ if attribute_timeout is not None and "--attr-timeout" not in other_cmds:
393
+ other_cmds.append("--attr-timeout")
394
+ other_cmds.append(attribute_timeout)
372
395
  if vfs_read_chunk_streams:
373
396
  other_cmds.append("--vfs-read-chunk-streams")
374
397
  other_cmds.append(str(vfs_read_chunk_streams))
@@ -380,7 +403,11 @@ class Rclone:
380
403
 
381
404
  other_cmds = other_cmds if other_cmds else None
382
405
  return self.mount(
383
- url, outdir, vfs_cache_mode=vfs_cache_mode, other_cmds=other_cmds
406
+ url,
407
+ outdir,
408
+ allow_writes=allow_writes,
409
+ vfs_cache_mode=vfs_cache_mode,
410
+ other_cmds=other_cmds,
384
411
  )
385
412
 
386
413
  def serve_webdav(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rclone_api
3
- Version: 1.0.24
3
+ Version: 1.0.26
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  Maintainer: Zachary Vorhies
@@ -8,16 +8,16 @@ rclone_api/exec.py,sha256=9qSOpZo8YRYxv3hOvNr57ApnY2KbjxwT1QNr8OgcLM4,883
8
8
  rclone_api/file.py,sha256=D02iHJW1LhfOiM_R_yPHP8_ApnDiYrkuraVcrV8-qkw,1246
9
9
  rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
10
10
  rclone_api/process.py,sha256=iVA8_qtJFgHtg92Yb4W7xv9jnyds_7kAdKeSiGCBIZ0,3952
11
- rclone_api/rclone.py,sha256=jNZVeTPyNH2BwGsA7OIs18PkMSBOmQLxS0yz6dHlkAU,14596
11
+ rclone_api/rclone.py,sha256=C5cbPahwJy0QuhQ3U8wH0DOY-SvKxPKKyogshXlp3P4,15755
12
12
  rclone_api/remote.py,sha256=c9hlRKBCg1BFB9MCINaQIoCg10qyAkeqiS4brl8ce-8,343
13
13
  rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
14
14
  rclone_api/util.py,sha256=AWTImA1liCMw52wtS-Gs8Abz96diQ39x6Tx56mvbrEo,3860
15
15
  rclone_api/walk.py,sha256=kca0t1GAnF6FLclN01G8NG__Qe-ggodLtAbQSHyVPng,2968
16
16
  rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
17
17
  rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
18
- rclone_api-1.0.24.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
19
- rclone_api-1.0.24.dist-info/METADATA,sha256=6Kv_3ixSg65E3cPLSATze1pRx_O2JMqcxbtDNDC7_cA,4454
20
- rclone_api-1.0.24.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
21
- rclone_api-1.0.24.dist-info/entry_points.txt,sha256=XUoTX3m7CWxdj2VAKhEuO0NMOfX2qf-OcEDFwdyk9ZE,72
22
- rclone_api-1.0.24.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
23
- rclone_api-1.0.24.dist-info/RECORD,,
18
+ rclone_api-1.0.26.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
19
+ rclone_api-1.0.26.dist-info/METADATA,sha256=CgaiMFCFjCPlnagzK7xi1wsLwB6YVl8fsEJii3HQbAM,4454
20
+ rclone_api-1.0.26.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
21
+ rclone_api-1.0.26.dist-info/entry_points.txt,sha256=XUoTX3m7CWxdj2VAKhEuO0NMOfX2qf-OcEDFwdyk9ZE,72
22
+ rclone_api-1.0.26.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
23
+ rclone_api-1.0.26.dist-info/RECORD,,