neptune-sdk 0.0.1.dev798__tar.gz → 0.0.1.dev838__tar.gz
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.
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/PKG-INFO +1 -1
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/pyproject.toml +1 -1
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/src/neptune_sdk/__init__.py +2 -3
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/src/neptune_sdk/client.py +18 -0
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/src/neptune_sdk/models.py +15 -0
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/tests/test_client.py +1 -1
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/src/neptune_sdk/exceptions.py +0 -0
- {neptune_sdk-0.0.1.dev798 → neptune_sdk-0.0.1.dev838}/tests/__init__.py +0 -0
|
@@ -25,8 +25,8 @@ from .models import (
|
|
|
25
25
|
TorrentInfo,
|
|
26
26
|
TorrentListResponse,
|
|
27
27
|
TorrentPeersResponse,
|
|
28
|
-
TorrentTrackersResponse,
|
|
29
28
|
TorrentState,
|
|
29
|
+
TorrentTrackersResponse,
|
|
30
30
|
Tracker,
|
|
31
31
|
TransferSummary,
|
|
32
32
|
UpdateCustomRequest,
|
|
@@ -65,8 +65,7 @@ __all__ = [
|
|
|
65
65
|
"TorrentListResponse",
|
|
66
66
|
"TorrentPeersResponse",
|
|
67
67
|
"TorrentTrackersResponse",
|
|
68
|
+
"TorrentState",
|
|
68
69
|
"Tracker",
|
|
69
70
|
"TransferSummary",
|
|
70
|
-
# state constants
|
|
71
|
-
"TorrentState",
|
|
72
71
|
]
|
|
@@ -21,6 +21,7 @@ from .models import (
|
|
|
21
21
|
GetDownloadSlotsResponse,
|
|
22
22
|
GetRecheckOnCompleteResponse,
|
|
23
23
|
GetSlowDownloadSpeedThresholdResponse,
|
|
24
|
+
GetTorrentConnectionLimitResponse,
|
|
24
25
|
InfoHashRequest,
|
|
25
26
|
ListTorrentRequest,
|
|
26
27
|
MoveTorrentRequest,
|
|
@@ -35,6 +36,7 @@ from .models import (
|
|
|
35
36
|
SetRecheckOnCompleteRequest,
|
|
36
37
|
SetSlowDownloadSpeedThresholdRequest,
|
|
37
38
|
SetSpeedLimitRequest,
|
|
39
|
+
SetTorrentConnectionLimitRequest,
|
|
38
40
|
TagsRequest,
|
|
39
41
|
TorrentFilesResponse,
|
|
40
42
|
TorrentInfo,
|
|
@@ -120,6 +122,8 @@ class NeptuneClient:
|
|
|
120
122
|
}
|
|
121
123
|
if params is not None:
|
|
122
124
|
payload["params"] = asdict(params)
|
|
125
|
+
else:
|
|
126
|
+
payload["params"] = {}
|
|
123
127
|
|
|
124
128
|
body_bytes = json.dumps(payload, default=_json_default).encode()
|
|
125
129
|
|
|
@@ -369,6 +373,20 @@ class NeptuneClient:
|
|
|
369
373
|
self._call("client.get_recheck_on_complete"),
|
|
370
374
|
)
|
|
371
375
|
|
|
376
|
+
def client_set_torrent_connection_limit(self, limit: int) -> None:
|
|
377
|
+
"""Set max connections per torrent."""
|
|
378
|
+
self._call(
|
|
379
|
+
"client.set_torrent_connection_limit",
|
|
380
|
+
SetTorrentConnectionLimitRequest(limit=limit),
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
def client_get_torrent_connection_limit(self) -> GetTorrentConnectionLimitResponse:
|
|
384
|
+
"""Get max connections per torrent."""
|
|
385
|
+
return _validate(
|
|
386
|
+
GetTorrentConnectionLimitResponse,
|
|
387
|
+
self._call("client.get_torrent_connection_limit"),
|
|
388
|
+
)
|
|
389
|
+
|
|
372
390
|
# ── torrent — file priority ────────────────────────────────────────
|
|
373
391
|
|
|
374
392
|
def torrent_set_file_priority(
|
|
@@ -58,6 +58,7 @@ class TransferSummary:
|
|
|
58
58
|
download_total: int
|
|
59
59
|
upload_rate: int
|
|
60
60
|
upload_total: int
|
|
61
|
+
connection_count: int = 0
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
@dataclass(frozen=True, slots=True, kw_only=True)
|
|
@@ -323,3 +324,17 @@ class TorrentTrackersResponse:
|
|
|
323
324
|
"""Response for torrent.trackers."""
|
|
324
325
|
|
|
325
326
|
trackers: list[Tracker]
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@dataclass(frozen=True, slots=True, kw_only=True)
|
|
330
|
+
class SetTorrentConnectionLimitRequest:
|
|
331
|
+
"""Parameters for client.set_torrent_connection_limit."""
|
|
332
|
+
|
|
333
|
+
limit: int = 0
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
@dataclass(frozen=True, slots=True, kw_only=True)
|
|
337
|
+
class GetTorrentConnectionLimitResponse:
|
|
338
|
+
"""Response for client.get_torrent_connection_limit."""
|
|
339
|
+
|
|
340
|
+
limit: int = 0
|
|
File without changes
|
|
File without changes
|