rclone-api 1.5.65__py3-none-any.whl → 1.5.66__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
@@ -48,7 +48,7 @@ from .types import ( # Common types
48
48
  setup_default_logging()
49
49
 
50
50
 
51
- def rclone_verbose(val: bool | None) -> bool:
51
+ def rclone_verbose(val: bool | None, from_api: bool = False) -> bool:
52
52
  """
53
53
  Get or set the global verbosity setting for rclone operations.
54
54
 
@@ -61,21 +61,43 @@ def rclone_verbose(val: bool | None) -> bool:
61
61
  Returns:
62
62
  The current verbosity setting after any change.
63
63
  """
64
+ import warnings
65
+
64
66
  from rclone_api.rclone_impl import rclone_verbose as _rclone_verbose
65
67
 
68
+ if not from_api:
69
+ warnings.warn(
70
+ "rclone_verbose is deprecated. Use LogSettings.rclone_verbose instead.",
71
+ DeprecationWarning,
72
+ )
73
+
66
74
  return _rclone_verbose(val)
67
75
 
68
76
 
69
- class Logging:
77
+ class LogSettings:
70
78
  @staticmethod
71
- def enable_upload_parts_logging(value: bool) -> None:
79
+ def enable_upload_parts_logging(value: bool | None = None) -> bool:
72
80
  """
73
81
  Enable or disable logging of upload parts.
74
82
 
75
83
  Args:
76
84
  value: If True, enables upload parts logging; otherwise disables it.
77
85
  """
78
- os.environ["LOG_UPLOAD_S3_RESUMABLE"] = "1" if value else "0"
86
+
87
+ if value is not None:
88
+ os.environ["LOG_UPLOAD_S3_RESUMABLE"] = "1" if value else "0"
89
+ env_val = str(os.getenv("LOG_UPLOAD_S3_RESUMABLE", "0"))
90
+ return env_val.lower() in ["1", "true", "yes"]
91
+
92
+ @staticmethod
93
+ def rclone_verbose(value: bool) -> bool:
94
+ """
95
+ Enable or disable verbose logging for rclone commands.
96
+
97
+ Args:
98
+ value: If True, enables verbose logging; otherwise disables it.
99
+ """
100
+ return rclone_verbose(value, from_api=True)
79
101
 
80
102
 
81
103
  class Rclone:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rclone_api
3
- Version: 1.5.65
3
+ Version: 1.5.66
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=AH0_iCsWfPCphaXgN0eV7zeZ5WvinUYpyizwPIuUqmQ,35244
1
+ rclone_api/__init__.py,sha256=TLQhluXlEYEcOz0HlDtgrEs1EE15f34k6NHpW3-_dBY,35950
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
@@ -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=Th6m3owHS6Z-ieNhhDtU0_A6nDgKMo9y_Qv6e7lRia8,11634
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.65.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
62
- rclone_api-1.5.65.dist-info/METADATA,sha256=tx0O8RMD9s9oAQYXW79wpP9HupCOuh0fb13px0uy9b0,37305
63
- rclone_api-1.5.65.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
64
- rclone_api-1.5.65.dist-info/entry_points.txt,sha256=ognh2e11HTjn73_KL5MWI67pBKS2jekBi-QTiRXySXA,316
65
- rclone_api-1.5.65.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
66
- rclone_api-1.5.65.dist-info/RECORD,,
61
+ rclone_api-1.5.66.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
62
+ rclone_api-1.5.66.dist-info/METADATA,sha256=9y7fYAATBpfbj1sVP9_4b6JbQ83Fyirtye_FFUIi4to,37305
63
+ rclone_api-1.5.66.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
64
+ rclone_api-1.5.66.dist-info/entry_points.txt,sha256=ognh2e11HTjn73_KL5MWI67pBKS2jekBi-QTiRXySXA,316
65
+ rclone_api-1.5.66.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
66
+ rclone_api-1.5.66.dist-info/RECORD,,