rclone-api 1.5.61__py3-none-any.whl → 1.5.63__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/__init__.py CHANGED
@@ -469,6 +469,41 @@ class Rclone:
469
469
  """
470
470
  return self.impl.is_s3(dst=dst)
471
471
 
472
+ def copy_file_s3_resumable(
473
+ self,
474
+ src: str, # src:/Bucket/path/myfile.large.zst
475
+ dst: str, # dst:/Bucket/path/myfile.large.zst
476
+ part_infos: list[PartInfo] | None = None,
477
+ upload_threads: int = 8, # Number of reader and writer threads to use
478
+ merge_threads: int = 4, # Number of threads to use for merging the parts
479
+ ) -> Exception | None:
480
+ """
481
+ Copy a large file to S3 with resumable upload capability.
482
+
483
+ This method splits the file into parts for parallel upload and can
484
+ resume interrupted transfers using a custom algorithm in python.
485
+
486
+ Particularly useful for very large files where network interruptions
487
+ are likely.
488
+
489
+ Args:
490
+ src: Source file path (format: remote:bucket/path/file)
491
+ dst: Destination file path (format: remote:bucket/path/file)
492
+ part_infos: Optional list of part information for resuming uploads
493
+ upload_threads: Number of parallel upload threads
494
+ merge_threads: Number of threads for merging uploaded parts
495
+
496
+ Returns:
497
+ None if successful, Exception if an error occurred
498
+ """
499
+ return self.impl.copy_file_s3_resumable(
500
+ src=src,
501
+ dst=dst,
502
+ part_infos=part_infos,
503
+ upload_threads=upload_threads,
504
+ merge_threads=merge_threads,
505
+ )
506
+
472
507
  def copy_to(
473
508
  self,
474
509
  src: File | str,
@@ -831,41 +866,6 @@ class Rclone:
831
866
  """
832
867
  return self.impl.copy_remote(src=src, dst=dst, args=args)
833
868
 
834
- def copy_file_s3_resumable(
835
- self,
836
- src: str, # src:/Bucket/path/myfile.large.zst
837
- dst: str, # dst:/Bucket/path/myfile.large.zst
838
- part_infos: list[PartInfo] | None = None,
839
- upload_threads: int = 8, # Number of reader and writer threads to use
840
- merge_threads: int = 4, # Number of threads to use for merging the parts
841
- ) -> Exception | None:
842
- """
843
- Copy a large file to S3 with resumable upload capability.
844
-
845
- This method splits the file into parts for parallel upload and can
846
- resume interrupted transfers using a custom algorithm in python.
847
-
848
- Particularly useful for very large files where network interruptions
849
- are likely.
850
-
851
- Args:
852
- src: Source file path (format: remote:bucket/path/file)
853
- dst: Destination file path (format: remote:bucket/path/file)
854
- part_infos: Optional list of part information for resuming uploads
855
- upload_threads: Number of parallel upload threads
856
- merge_threads: Number of threads for merging uploaded parts
857
-
858
- Returns:
859
- None if successful, Exception if an error occurred
860
- """
861
- return self.impl.copy_file_s3_resumable(
862
- src=src,
863
- dst=dst,
864
- part_infos=part_infos,
865
- upload_threads=upload_threads,
866
- merge_threads=merge_threads,
867
- )
868
-
869
869
  def mount(
870
870
  self,
871
871
  src: Remote | Dir | str,
rclone_api/rclone_impl.py CHANGED
@@ -1363,7 +1363,8 @@ class RcloneImpl:
1363
1363
  verbose = get_verbose(verbose)
1364
1364
  check = get_check(check)
1365
1365
  if len(files) < 2:
1366
- tmp = self.size_file(files[0])
1366
+ full_path = f"{src}/{files[0]}"
1367
+ tmp = self.size_file(full_path)
1367
1368
  if isinstance(tmp, Exception):
1368
1369
  return tmp
1369
1370
  assert isinstance(tmp, SizeSuffix)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rclone_api
3
- Version: 1.5.61
3
+ Version: 1.5.63
4
4
  Summary: rclone api in python
5
5
  Home-page: https://github.com/zackees/rclone-api
6
6
  License: BSD 3-Clause License
@@ -1,4 +1,4 @@
1
- rclone_api/__init__.py,sha256=M3-jlyxhO7Md3FGMO8qBJ1Z7oLcbOjWshCHh2-CqKG4,34885
1
+ rclone_api/__init__.py,sha256=gIONLifrNkReIlQkpJOk3TTueJ9jrJ2ZdM2scQSUvSY,34885
2
2
  rclone_api/cli.py,sha256=dibfAZIh0kXWsBbfp3onKLjyZXo54mTzDjUdzJlDlWo,231
3
3
  rclone_api/completed_process.py,sha256=_IZ8IWK7DM1_tsbDEkH6wPZ-bbcrgf7A7smls854pmg,1775
4
4
  rclone_api/config.py,sha256=URZwMME01f0EZymprCESuZ5dk4IuUSKbHhwIeTHrn7A,6131
@@ -20,7 +20,7 @@ rclone_api/log.py,sha256=VZHM7pNSXip2ZLBKMP7M1u-rp_F7zoafFDuR8CPUoKI,1271
20
20
  rclone_api/mount.py,sha256=LZqEhuKZunbWVqmsOIqkkCotaxWJpdFRS1InXveoU5E,1428
21
21
  rclone_api/mount_util.py,sha256=jqhJEVTHV6c6lOOzUYb4FLMbqDMHdz7-QRcdH-IobFc,10154
22
22
  rclone_api/process.py,sha256=V4Ax9AyNdC3m4O6gjWSbIJyCQCMhT-t0f-K8z6xux7Q,5946
23
- rclone_api/rclone_impl.py,sha256=FXIkDOGnqp7zN9pks3WXoruIJki9M2sJd0-QX5cMQgg,52603
23
+ rclone_api/rclone_impl.py,sha256=PppFWk4qo7gg6p_k3K7am3_6pytsLG6qTAKo6dBT-tI,52649
24
24
  rclone_api/remote.py,sha256=mTgMTQTwxUmbLjTpr-AGTId2ycXKI9mLX5L7PPpDIoc,520
25
25
  rclone_api/rpath.py,sha256=Y1JjQWcie39EgQrq-UtbfDz5yDLCwwfu27W7AQXllSE,2860
26
26
  rclone_api/scan_missing_folders.py,sha256=-8NCwpCaHeHrX-IepCoAEsX1rl8S-GOCxcIhTr_w3gA,4747
@@ -58,9 +58,9 @@ rclone_api/s3/multipart/upload_parts_inline.py,sha256=V7syKjFyVIe4U9Ahl5XgqVTzt9
58
58
  rclone_api/s3/multipart/upload_parts_resumable.py,sha256=6-nlMclS8jyVvMvFbQDcZOX9MY1WbCcKA_s9bwuYxnk,9793
59
59
  rclone_api/s3/multipart/upload_parts_server_side_merge.py,sha256=Fp2pdrs5dONQI9LkfNolgAGj1-Z2V1SsRd0r0sreuXI,18040
60
60
  rclone_api/s3/multipart/upload_state.py,sha256=f-Aq2NqtAaMUMhYitlICSNIxCKurWAl2gDEUVizLIqw,6019
61
- rclone_api-1.5.61.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
62
- rclone_api-1.5.61.dist-info/METADATA,sha256=6euBxBpkAYSnNXNCu_JDaYOiTIDW6vzyzHxpx09u-0g,37305
63
- rclone_api-1.5.61.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
64
- rclone_api-1.5.61.dist-info/entry_points.txt,sha256=ognh2e11HTjn73_KL5MWI67pBKS2jekBi-QTiRXySXA,316
65
- rclone_api-1.5.61.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
66
- rclone_api-1.5.61.dist-info/RECORD,,
61
+ rclone_api-1.5.63.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
62
+ rclone_api-1.5.63.dist-info/METADATA,sha256=9XSnDbl63rF0hMxexBm7t65FmtxbjMyNiIURw5ixrxo,37305
63
+ rclone_api-1.5.63.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
64
+ rclone_api-1.5.63.dist-info/entry_points.txt,sha256=ognh2e11HTjn73_KL5MWI67pBKS2jekBi-QTiRXySXA,316
65
+ rclone_api-1.5.63.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
66
+ rclone_api-1.5.63.dist-info/RECORD,,