rclone-api 1.0.88__py2.py3-none-any.whl → 1.0.89__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/__init__.py +5 -1
- rclone_api/config.py +68 -1
- rclone_api/group_files.py +4 -1
- rclone_api/rclone.py +225 -49
- rclone_api/s3/api.py +72 -0
- rclone_api/s3/basic_ops.py +61 -0
- rclone_api/s3/chunk_uploader.py +538 -0
- rclone_api/s3/create.py +71 -0
- rclone_api/s3/types.py +55 -0
- rclone_api/types.py +5 -3
- rclone_api/util.py +30 -4
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/METADATA +2 -3
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/RECORD +17 -12
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/WHEEL +1 -1
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/LICENSE +0 -0
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.0.88.dist-info → rclone_api-1.0.89.dist-info}/top_level.txt +0 -0
rclone_api/util.py
CHANGED
|
@@ -11,6 +11,7 @@ from rclone_api.config import Config
|
|
|
11
11
|
from rclone_api.dir import Dir
|
|
12
12
|
from rclone_api.remote import Remote
|
|
13
13
|
from rclone_api.rpath import RPath
|
|
14
|
+
from rclone_api.types import S3PathInfo
|
|
14
15
|
|
|
15
16
|
# from .rclone import Rclone
|
|
16
17
|
|
|
@@ -126,7 +127,7 @@ def rclone_execute(
|
|
|
126
127
|
print(f"Error cleaning up tempdir: {e}")
|
|
127
128
|
|
|
128
129
|
|
|
129
|
-
def wait_for_mount(path: Path, mount_process: Any, timeout: int =
|
|
130
|
+
def wait_for_mount(path: Path, mount_process: Any, timeout: int = 10) -> None:
|
|
130
131
|
from rclone_api.process import Process
|
|
131
132
|
|
|
132
133
|
assert isinstance(mount_process, Process)
|
|
@@ -134,7 +135,32 @@ def wait_for_mount(path: Path, mount_process: Any, timeout: int = 60) -> None:
|
|
|
134
135
|
while time.time() < expire_time:
|
|
135
136
|
rtn = mount_process.poll()
|
|
136
137
|
if rtn is not None:
|
|
137
|
-
|
|
138
|
+
cmd_str = subprocess.list2cmdline(mount_process.cmd)
|
|
139
|
+
raise subprocess.CalledProcessError(rtn, cmd_str)
|
|
138
140
|
if path.exists():
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
# how many files?
|
|
142
|
+
dircontents = os.listdir(str(path))
|
|
143
|
+
if len(dircontents) > 0:
|
|
144
|
+
return
|
|
145
|
+
time.sleep(1)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def split_s3_path(path: str) -> S3PathInfo:
|
|
149
|
+
if ":" not in path:
|
|
150
|
+
raise ValueError(f"Invalid S3 path: {path}")
|
|
151
|
+
|
|
152
|
+
prts = path.split(":", 1)
|
|
153
|
+
remote = prts[0]
|
|
154
|
+
path = prts[1]
|
|
155
|
+
parts: list[str] = []
|
|
156
|
+
for part in path.split("/"):
|
|
157
|
+
part = part.strip()
|
|
158
|
+
if part:
|
|
159
|
+
parts.append(part)
|
|
160
|
+
if len(parts) < 2:
|
|
161
|
+
raise ValueError(f"Invalid S3 path: {path}")
|
|
162
|
+
bucket = parts[0]
|
|
163
|
+
key = "/".join(parts[1:])
|
|
164
|
+
assert bucket
|
|
165
|
+
assert key
|
|
166
|
+
return S3PathInfo(remote=remote, bucket=bucket, key=key)
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: rclone_api
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.89
|
|
4
4
|
Summary: rclone api in python
|
|
5
5
|
Home-page: https://github.com/zackees/rclone-api
|
|
6
|
-
Maintainer: Zachary Vorhies
|
|
7
6
|
License: BSD 3-Clause License
|
|
8
7
|
Keywords: template-python-cmd
|
|
9
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -12,8 +11,8 @@ Description-Content-Type: text/markdown
|
|
|
12
11
|
License-File: LICENSE
|
|
13
12
|
Requires-Dist: pyright>=1.1.393
|
|
14
13
|
Requires-Dist: python-dotenv>=1.0.0
|
|
14
|
+
Requires-Dist: boto3<=1.35.99,>=1.20.1
|
|
15
15
|
Dynamic: home-page
|
|
16
|
-
Dynamic: maintainer
|
|
17
16
|
|
|
18
17
|
# rclone-api
|
|
19
18
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
rclone_api/__init__.py,sha256=
|
|
1
|
+
rclone_api/__init__.py,sha256=m7hQkaIsn9grAlziu9nvDlOIQY6VflYFwC1c_g0qCJo,833
|
|
2
2
|
rclone_api/cli.py,sha256=dibfAZIh0kXWsBbfp3onKLjyZXo54mTzDjUdzJlDlWo,231
|
|
3
3
|
rclone_api/completed_process.py,sha256=_IZ8IWK7DM1_tsbDEkH6wPZ-bbcrgf7A7smls854pmg,1775
|
|
4
|
-
rclone_api/config.py,sha256=
|
|
4
|
+
rclone_api/config.py,sha256=okqhnkV2fAAwm9nGc92-uDL6g69MlAWN3P6OKmRCQRY,2099
|
|
5
5
|
rclone_api/convert.py,sha256=Mx9Qo7zhkOedJd8LdhPvNGHp8znJzOk4f_2KWnoGc78,1012
|
|
6
6
|
rclone_api/deprecated.py,sha256=qWKpnZdYcBK7YQZKuVoWWXDwi-uqiAtbjgPcci_efow,590
|
|
7
7
|
rclone_api/diff.py,sha256=tMoJMAGmLSE6Q_7QhPf6PnCzb840djxMZtDmhc2GlGQ,5227
|
|
@@ -10,20 +10,25 @@ rclone_api/dir_listing.py,sha256=GoziW8Sne6FY90MLNcb2aO3aaa3jphB6H8ExYrV0Ryo,188
|
|
|
10
10
|
rclone_api/exec.py,sha256=1ovvaMXDEfLiT7BrYZyE85u_yFhEUwUNW3jPOzqknR8,1023
|
|
11
11
|
rclone_api/file.py,sha256=EP5yT2dZ0H2p7CY5n0y5k5pHhIliV25pm8KOwBklUTk,1863
|
|
12
12
|
rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
|
|
13
|
-
rclone_api/group_files.py,sha256=
|
|
13
|
+
rclone_api/group_files.py,sha256=H92xPW9lQnbNw5KbtZCl00bD6iRh9yRbCuxku4j_3dg,8036
|
|
14
14
|
rclone_api/process.py,sha256=RrMfTe0bndmJ6gBK67ioqNvCstJ8aTC8RlGX1XBLlcw,4191
|
|
15
|
-
rclone_api/rclone.py,sha256=
|
|
15
|
+
rclone_api/rclone.py,sha256=qKOgK544zWCmD4Uowc35X0gq1BNGLwcAjIHFgOF9mH8,40603
|
|
16
16
|
rclone_api/remote.py,sha256=O9WDUFQy9f6oT1HdUbTixK2eg0xtBBm8k4Xl6aa6K00,431
|
|
17
17
|
rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
|
|
18
18
|
rclone_api/scan_missing_folders.py,sha256=Kulca2Q6WZodt00ATFHkmqqInuoPvBkhTcS9703y6po,4740
|
|
19
|
-
rclone_api/types.py,sha256=
|
|
20
|
-
rclone_api/util.py,sha256=
|
|
19
|
+
rclone_api/types.py,sha256=NC3e78aXCx-sEQ-FqEaC9KzaJDdJhJrKa4Nwum_-Db0,563
|
|
20
|
+
rclone_api/util.py,sha256=HwNqr_HmJvbK8uqHQRF6ockT9Nsgw4G1lUGEkEUkjEs,4910
|
|
21
21
|
rclone_api/walk.py,sha256=-54NVE8EJcCstwDoaC_UtHm73R2HrZwVwQmsnv55xNU,3369
|
|
22
22
|
rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
|
23
23
|
rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
|
|
24
|
-
rclone_api
|
|
25
|
-
rclone_api
|
|
26
|
-
rclone_api
|
|
27
|
-
rclone_api
|
|
28
|
-
rclone_api
|
|
29
|
-
rclone_api-1.0.
|
|
24
|
+
rclone_api/s3/api.py,sha256=rFiUSQuW5q37CIfuN2mPq1aekFDMQ9lwH0qH9AQ9blg,2704
|
|
25
|
+
rclone_api/s3/basic_ops.py,sha256=hK3366xhVEzEcjz9Gk_8lFx6MRceAk72cax6mUrr6ko,2104
|
|
26
|
+
rclone_api/s3/chunk_uploader.py,sha256=Wcm4h_A6ORaJvT9P9qSeknbJYch22RKZ4FGo1iePlAw,17385
|
|
27
|
+
rclone_api/s3/create.py,sha256=M9_c30XYGUfqMY8o4Vl1OrVL7Fi416C7JqUEjDmb3_k,2741
|
|
28
|
+
rclone_api/s3/types.py,sha256=hGzmWx040X4Dmk_C7hugNk-DT1Zqs4staJy1b8z6PlY,1188
|
|
29
|
+
rclone_api-1.0.89.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
|
30
|
+
rclone_api-1.0.89.dist-info/METADATA,sha256=i1u6MZ5Go_-oYnV64Rbdm2zh8oOB6EPsPv3dGjEYQaI,4479
|
|
31
|
+
rclone_api-1.0.89.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
|
|
32
|
+
rclone_api-1.0.89.dist-info/entry_points.txt,sha256=XUoTX3m7CWxdj2VAKhEuO0NMOfX2qf-OcEDFwdyk9ZE,72
|
|
33
|
+
rclone_api-1.0.89.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
|
34
|
+
rclone_api-1.0.89.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|