rclone-api 1.0.25__tar.gz → 1.0.27__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rclone-api might be problematic. Click here for more details.
- {rclone_api-1.0.25 → rclone_api-1.0.27}/PKG-INFO +3 -3
- {rclone_api-1.0.25 → rclone_api-1.0.27}/README.md +2 -2
- {rclone_api-1.0.25 → rclone_api-1.0.27}/pyproject.toml +1 -1
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/dir_listing.py +16 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/rclone.py +24 -2
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/PKG-INFO +3 -3
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.aiderignore +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.gitignore +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.pylintrc +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.vscode/launch.json +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.vscode/settings.json +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/.vscode/tasks.json +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/LICENSE +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/MANIFEST.in +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/clean +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/install +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/lint +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/requirements.testing.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/setup.cfg +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/setup.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/config.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/file.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/process.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/util.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/test +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_copy.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_is_synced.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_ls.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_mount.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_mount_webdav.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_obscure.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_remotes.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_serve_webdav.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tests/test_walk.py +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/tox.ini +0 -0
- {rclone_api-1.0.25 → rclone_api-1.0.27}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: rclone_api
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.27
|
4
4
|
Summary: rclone api in python
|
5
5
|
Home-page: https://github.com/zackees/rclone-api
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -22,11 +22,11 @@ Dynamic: maintainer
|
|
22
22
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_ubuntu.yml)
|
23
23
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_win.yml)
|
24
24
|
|
25
|
-
Api version of rclone. It's
|
25
|
+
Api version of rclone. It's a pretty low level api without the bells and whistles of other apis, but it will get the job done. Unit tests up the wazoo. S3 Mounts on windows/linux are heavily optimized.
|
26
26
|
|
27
27
|
You will need to have rclone installed and on your path.
|
28
28
|
|
29
|
-
One of the benefits of this api is that it does not use
|
29
|
+
One of the benefits of this api is that it does not use 'shell=True' so therefore ctrl-c will work well in gracefully shutting down
|
30
30
|
|
31
31
|
# Install
|
32
32
|
|
@@ -5,11 +5,11 @@
|
|
5
5
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_ubuntu.yml)
|
6
6
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_win.yml)
|
7
7
|
|
8
|
-
Api version of rclone. It's
|
8
|
+
Api version of rclone. It's a pretty low level api without the bells and whistles of other apis, but it will get the job done. Unit tests up the wazoo. S3 Mounts on windows/linux are heavily optimized.
|
9
9
|
|
10
10
|
You will need to have rclone installed and on your path.
|
11
11
|
|
12
|
-
One of the benefits of this api is that it does not use
|
12
|
+
One of the benefits of this api is that it does not use 'shell=True' so therefore ctrl-c will work well in gracefully shutting down
|
13
13
|
|
14
14
|
# Install
|
15
15
|
|
@@ -1,8 +1,22 @@
|
|
1
1
|
import json
|
2
|
+
import warnings
|
2
3
|
|
3
4
|
from rclone_api.rpath import RPath
|
4
5
|
|
5
6
|
|
7
|
+
def _dedupe(items: list[RPath]) -> list[RPath]:
|
8
|
+
"""Remove duplicate items from a list of RPath objects."""
|
9
|
+
seen = set()
|
10
|
+
unique_items = []
|
11
|
+
for item in items:
|
12
|
+
if item not in seen:
|
13
|
+
seen.add(item)
|
14
|
+
unique_items.append(item)
|
15
|
+
else:
|
16
|
+
warnings.warn(f"Duplicate item found: {item}, filtered out.")
|
17
|
+
return unique_items
|
18
|
+
|
19
|
+
|
6
20
|
class DirListing:
|
7
21
|
"""Remote file dataclass."""
|
8
22
|
|
@@ -10,6 +24,8 @@ class DirListing:
|
|
10
24
|
from rclone_api.dir import Dir
|
11
25
|
from rclone_api.file import File
|
12
26
|
|
27
|
+
dirs_and_files = _dedupe(dirs_and_files)
|
28
|
+
|
13
29
|
self.dirs: list[Dir] = [Dir(d) for d in dirs_and_files if d.is_dir]
|
14
30
|
self.files: list[File] = [File(f) for f in dirs_and_files if not f.is_dir]
|
15
31
|
|
@@ -347,13 +347,21 @@ class Rclone:
|
|
347
347
|
outdir: Path,
|
348
348
|
allow_writes=False,
|
349
349
|
vfs_cache_mode="full",
|
350
|
-
|
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,
|
351
357
|
modtime_strategy: (
|
352
358
|
ModTimeStrategy | None
|
353
359
|
) = ModTimeStrategy.USE_SERVER_MODTIME, # speeds up S3 operations
|
354
360
|
vfs_read_chunk_streams: int | None = 16,
|
355
361
|
vfs_read_chunk_size: str | None = "4M",
|
356
362
|
vfs_fast_fingerprint: bool = True,
|
363
|
+
# vfs-refresh
|
364
|
+
vfs_refresh: bool = True,
|
357
365
|
other_cmds: list[str] | None = None,
|
358
366
|
) -> Process:
|
359
367
|
"""Mount a remote or directory to a local path.
|
@@ -366,10 +374,24 @@ class Rclone:
|
|
366
374
|
if modtime_strategy is not None:
|
367
375
|
other_cmds.append(f"--{modtime_strategy.value}")
|
368
376
|
if (vfs_cache_mode == "full" or vfs_cache_mode == "writes") and (
|
369
|
-
transfers is not None
|
377
|
+
transfers is not None and "--transfers" not in other_cmds
|
370
378
|
):
|
371
379
|
other_cmds.append("--transfers")
|
372
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)
|
373
395
|
if vfs_read_chunk_streams:
|
374
396
|
other_cmds.append("--vfs-read-chunk-streams")
|
375
397
|
other_cmds.append(str(vfs_read_chunk_streams))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: rclone_api
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.27
|
4
4
|
Summary: rclone api in python
|
5
5
|
Home-page: https://github.com/zackees/rclone-api
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -22,11 +22,11 @@ Dynamic: maintainer
|
|
22
22
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_ubuntu.yml)
|
23
23
|
[](https://github.com/zackees/rclone-api/actions/workflows/push_win.yml)
|
24
24
|
|
25
|
-
Api version of rclone. It's
|
25
|
+
Api version of rclone. It's a pretty low level api without the bells and whistles of other apis, but it will get the job done. Unit tests up the wazoo. S3 Mounts on windows/linux are heavily optimized.
|
26
26
|
|
27
27
|
You will need to have rclone installed and on your path.
|
28
28
|
|
29
|
-
One of the benefits of this api is that it does not use
|
29
|
+
One of the benefits of this api is that it does not use 'shell=True' so therefore ctrl-c will work well in gracefully shutting down
|
30
30
|
|
31
31
|
# Install
|
32
32
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|