p115client 0.0.5.11__py3-none-any.whl → 0.0.5.11.2__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.
- p115client/_upload.py +6 -6
- p115client/client.py +144 -51
- p115client/tool/attr.py +1 -1
- p115client/tool/download.py +48 -50
- p115client/tool/edit.py +2 -2
- p115client/tool/export_dir.py +17 -17
- p115client/tool/fs_files.py +3 -3
- p115client/tool/history.py +5 -5
- p115client/tool/iterdir.py +88 -89
- p115client/tool/life.py +12 -12
- p115client/tool/pool.py +5 -5
- p115client/tool/upload.py +14 -10
- p115client/tool/xys.py +7 -7
- {p115client-0.0.5.11.dist-info → p115client-0.0.5.11.2.dist-info}/METADATA +2 -2
- p115client-0.0.5.11.2.dist-info/RECORD +26 -0
- p115client-0.0.5.11.dist-info/RECORD +0 -26
- {p115client-0.0.5.11.dist-info → p115client-0.0.5.11.2.dist-info}/LICENSE +0 -0
- {p115client-0.0.5.11.dist-info → p115client-0.0.5.11.2.dist-info}/WHEEL +0 -0
p115client/tool/pool.py
CHANGED
@@ -88,7 +88,7 @@ def generate_auth_factory(
|
|
88
88
|
"authorization": "Bearer " + resp["data"]["access_token"],
|
89
89
|
"app_id": str(app_id),
|
90
90
|
}
|
91
|
-
return run_gen_step(gen_step,
|
91
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
92
92
|
return make_cookies
|
93
93
|
|
94
94
|
|
@@ -142,7 +142,7 @@ def generate_cookies_factory(
|
|
142
142
|
"cookie": "; ".join(f"{k}={v}" for k, v in resp["data"]["cookie"].items()),
|
143
143
|
"app": app,
|
144
144
|
}
|
145
|
-
return run_gen_step(gen_step,
|
145
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
146
146
|
return make_cookies
|
147
147
|
|
148
148
|
|
@@ -165,7 +165,7 @@ def generate_client_factory(
|
|
165
165
|
def gen_step():
|
166
166
|
headers = yield call(async_=async_)
|
167
167
|
return cls(headers["cookie"])
|
168
|
-
return run_gen_step(gen_step,
|
168
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
169
169
|
return make_client
|
170
170
|
|
171
171
|
|
@@ -215,7 +215,7 @@ def make_pool[T](
|
|
215
215
|
value = generate()
|
216
216
|
val = ComparedWithID(value)
|
217
217
|
return value, partial(heappush, heap_, (time(), val))
|
218
|
-
return run_gen_step(call,
|
218
|
+
return run_gen_step(call, may_call=False, async_=async_)
|
219
219
|
if not lock:
|
220
220
|
setattr(get_value, "heap", heap_)
|
221
221
|
return get_value
|
@@ -377,7 +377,7 @@ def call_wrap_with_pool(get_cert_headers: Callable, /, func: Callable) -> Callab
|
|
377
377
|
if not isinstance(e, (AuthenticationError, LoginError)) and get_status_code(e) != 405:
|
378
378
|
revert()
|
379
379
|
raise
|
380
|
-
return run_gen_step(gen_step,
|
380
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
381
381
|
return update_wrapper(wrapper, func)
|
382
382
|
|
383
383
|
|
p115client/tool/upload.py
CHANGED
@@ -348,7 +348,7 @@ def iter_115_to_115_resume(
|
|
348
348
|
**request_kwargs,
|
349
349
|
)) as get_next:
|
350
350
|
while True:
|
351
|
-
attr = yield get_next
|
351
|
+
attr = yield get_next()
|
352
352
|
if attr["name"] == name:
|
353
353
|
to_cid = attr["id"]
|
354
354
|
break
|
@@ -416,14 +416,18 @@ def iter_115_to_115_resume(
|
|
416
416
|
else:
|
417
417
|
dirt_to_cid[()] = 0
|
418
418
|
if async_:
|
419
|
-
return YieldFrom(
|
420
|
-
|
421
|
-
|
422
|
-
|
419
|
+
return YieldFrom(taskgroup_map(
|
420
|
+
upload,
|
421
|
+
from_files,
|
422
|
+
arg_func=get_pid,
|
423
|
+
max_workers=max_workers,
|
424
|
+
))
|
423
425
|
else:
|
424
|
-
return YieldFrom(
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
426
|
+
return YieldFrom(threadpool_map(
|
427
|
+
upload,
|
428
|
+
from_files,
|
429
|
+
arg_func=get_pid,
|
430
|
+
max_workers=max_workers,
|
431
|
+
))
|
432
|
+
return run_gen_step_iter(gen_step, may_call=False, async_=async_)
|
429
433
|
|
p115client/tool/xys.py
CHANGED
@@ -59,7 +59,7 @@ def wish_info(
|
|
59
59
|
)
|
60
60
|
check_response(resp)
|
61
61
|
return resp["data"]
|
62
|
-
return run_gen_step(gen_step,
|
62
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
63
63
|
|
64
64
|
|
65
65
|
@overload
|
@@ -110,7 +110,7 @@ def wish_make(
|
|
110
110
|
)
|
111
111
|
check_response(resp)
|
112
112
|
return P115StrID(resp["data"]["xys_id"], resp["data"])
|
113
|
-
return run_gen_step(gen_step,
|
113
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
114
114
|
|
115
115
|
|
116
116
|
@overload
|
@@ -170,7 +170,7 @@ def wish_answer(
|
|
170
170
|
)
|
171
171
|
check_response(resp)
|
172
172
|
return P115StrID(resp["data"]["aid_id"], resp["data"])
|
173
|
-
return run_gen_step(gen_step,
|
173
|
+
return run_gen_step(gen_step, may_call=False, async_=async_)
|
174
174
|
|
175
175
|
|
176
176
|
@overload
|
@@ -326,11 +326,11 @@ def wish_iter(
|
|
326
326
|
)
|
327
327
|
check_response(resp)
|
328
328
|
ls = resp["data"]["list"]
|
329
|
-
yield YieldFrom(ls
|
329
|
+
yield YieldFrom(ls)
|
330
330
|
if not ls:
|
331
331
|
break
|
332
332
|
payload["page"] += 1
|
333
|
-
return run_gen_step_iter(gen_step,
|
333
|
+
return run_gen_step_iter(gen_step, may_call=False, async_=async_)
|
334
334
|
|
335
335
|
|
336
336
|
@overload
|
@@ -385,11 +385,11 @@ def wish_aid_iter(
|
|
385
385
|
)
|
386
386
|
check_response(resp)
|
387
387
|
ls = resp["data"]["list"]
|
388
|
-
yield YieldFrom(ls
|
388
|
+
yield YieldFrom(ls)
|
389
389
|
if not ls:
|
390
390
|
break
|
391
391
|
payload["page"] += 1
|
392
|
-
return run_gen_step_iter(gen_step,
|
392
|
+
return run_gen_step_iter(gen_step, may_call=False, async_=async_)
|
393
393
|
|
394
394
|
|
395
395
|
# TODO: 再实现一个漂流瓶
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p115client
|
3
|
-
Version: 0.0.5.11
|
3
|
+
Version: 0.0.5.11.2
|
4
4
|
Summary: Python 115 webdisk client.
|
5
5
|
Home-page: https://github.com/ChenyangGao/p115client
|
6
6
|
License: MIT
|
@@ -40,7 +40,7 @@ Requires-Dist: python-filewrap (>=0.2.8)
|
|
40
40
|
Requires-Dist: python-hashtools (>=0.0.3.3)
|
41
41
|
Requires-Dist: python-http_request (>=0.0.6)
|
42
42
|
Requires-Dist: python-httpfile (>=0.0.5.2)
|
43
|
-
Requires-Dist: python-iterutils (>=0.2)
|
43
|
+
Requires-Dist: python-iterutils (>=0.2.1)
|
44
44
|
Requires-Dist: python-property (>=0.0.3)
|
45
45
|
Requires-Dist: python-startfile (>=0.0.2)
|
46
46
|
Requires-Dist: python-undefined (>=0.0.3)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
2
|
+
p115client/__init__.py,sha256=1mx7njuAlqcuEWONTjSiiGnXyyNyqOcJyNX1FMHqQ-4,214
|
3
|
+
p115client/_upload.py,sha256=RTYpM_EDFuI3O7yf08f13NdeG0iD03o_V4H6Je6Nsr8,30754
|
4
|
+
p115client/client.py,sha256=mcNfzZioE9MFtXohzBm7dRNsPwWR9NTrC6Uzrgryvlo,770927
|
5
|
+
p115client/const.py,sha256=Ks8eYjHYApxlkelVCbSJlpmlCYtbk8fX80jETV72BTY,7754
|
6
|
+
p115client/exception.py,sha256=O4SlfjbtI9GPjzbzJrFaFUZENJFz2qA3VDEKZfdhHbc,3590
|
7
|
+
p115client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
p115client/tool/__init__.py,sha256=NjT9rroMhLwKI7UlpSCksSsnB3GexXzxvhfunNWzjY0,386
|
9
|
+
p115client/tool/attr.py,sha256=rSnmVXhIqkUJ7NmwTo0LR76ZC2bOh1qaZkQok10Pzt8,2899
|
10
|
+
p115client/tool/download.py,sha256=-iq2JOolc4uba00wsp-Z_I03ZTFgqM4UKrfHAWpH2QA,61368
|
11
|
+
p115client/tool/edit.py,sha256=8EbchTpQQRFl0Z4AZlUL1Td_D3saM_VsHkV98ZNcD_4,17762
|
12
|
+
p115client/tool/export_dir.py,sha256=1r2qDuYIirtDkCBQfYXh6lbm06IStRpiom-ZjtIYdbo,24502
|
13
|
+
p115client/tool/fs_files.py,sha256=XTG12a_MVwYI4p1hs-xMol-AQsa8C9pWFt0BUzlQCws,15634
|
14
|
+
p115client/tool/history.py,sha256=qquCiiOIRpxOqmyXbmdwS_qpfPkduJilM6AGuOufrYU,7462
|
15
|
+
p115client/tool/iterdir.py,sha256=j7hZXrlUWBmg-kAgTjQ36BqY-8EiF9KLmPMM2ogHRPc,199632
|
16
|
+
p115client/tool/life.py,sha256=ceweN2uNKYxigSOaBQ4Abo5u05zqppRm_P7k-_rHjcA,17301
|
17
|
+
p115client/tool/pool.py,sha256=IR_ssyVhBSQYmfD--5Blyi7X3wtiPk7cLKb7YowhmEU,14033
|
18
|
+
p115client/tool/request.py,sha256=rjXuQwRganE5Z-4rfgnyPFjE4jzdQSLdIs9s0cIDshU,7043
|
19
|
+
p115client/tool/upload.py,sha256=i6laoeG7GdNO7hvCDVBy8Yv2Is800wL7O5na6a3v70g,15971
|
20
|
+
p115client/tool/util.py,sha256=0o9TrXdoPcljgxDDRdxRon41bq1OjuUYCWsR0XLfmPo,3357
|
21
|
+
p115client/tool/xys.py,sha256=vU28Px2yeQzIxxGkopJIpvV6TdOnWJ5xB6NPXpTgM0Y,10306
|
22
|
+
p115client/type.py,sha256=7kOp98uLaYqcTTCgCrb3DRcl8ukMpn7ibsnVvtw2nG8,6250
|
23
|
+
p115client-0.0.5.11.2.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
24
|
+
p115client-0.0.5.11.2.dist-info/METADATA,sha256=vc3q4KTax1DvKN_PWV93XTLvx-d-lH_oaEa3WJ_j8Yk,8240
|
25
|
+
p115client-0.0.5.11.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
26
|
+
p115client-0.0.5.11.2.dist-info/RECORD,,
|
@@ -1,26 +0,0 @@
|
|
1
|
-
LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
2
|
-
p115client/__init__.py,sha256=1mx7njuAlqcuEWONTjSiiGnXyyNyqOcJyNX1FMHqQ-4,214
|
3
|
-
p115client/_upload.py,sha256=eOBCQCiRApZucMglBLFGD8n6LKW1Q36Ua00G-x4lHQA,30758
|
4
|
-
p115client/client.py,sha256=EyWRveHMzhPFnndMTTDCEwWnelG4mNv1RSHNAnqVEvU,768952
|
5
|
-
p115client/const.py,sha256=Ks8eYjHYApxlkelVCbSJlpmlCYtbk8fX80jETV72BTY,7754
|
6
|
-
p115client/exception.py,sha256=O4SlfjbtI9GPjzbzJrFaFUZENJFz2qA3VDEKZfdhHbc,3590
|
7
|
-
p115client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
p115client/tool/__init__.py,sha256=NjT9rroMhLwKI7UlpSCksSsnB3GexXzxvhfunNWzjY0,386
|
9
|
-
p115client/tool/attr.py,sha256=MoLSDaa53nlvkDQOgX1Nq7CaCeO3I4tTkR9oq62dBGI,2896
|
10
|
-
p115client/tool/download.py,sha256=5P6Zvy8bO3DNj08Wrn7n0Ckhqj_f9gSVjfMAUhl9BPI,61646
|
11
|
-
p115client/tool/edit.py,sha256=F8FhtyBjXRQ7TroNTM8SMG3s9TmCRoDsHId2fGalxW4,17756
|
12
|
-
p115client/tool/export_dir.py,sha256=arLsge0C2tEIX3zx7zbgbsj8cplx6uFvg1GL1QKD080,24595
|
13
|
-
p115client/tool/fs_files.py,sha256=uo_2x8Nq1KTagNl2YdM8jRzp97pg513OVo280BK74xU,15645
|
14
|
-
p115client/tool/history.py,sha256=NhEx_Zc92rz8ois2OQ4b7lmGkjrACd4Of_nqQlZhEaM,7488
|
15
|
-
p115client/tool/iterdir.py,sha256=myqQea5l033fJxuoMWqNxP84qALWI2ZXfSlYDNf4dW8,200172
|
16
|
-
p115client/tool/life.py,sha256=bK2xZsgDfxTp1hWbxXZ6pWrnC1HmaWZv1c5q2s3CbaI,17387
|
17
|
-
p115client/tool/pool.py,sha256=EO_dmtcGBWCnbWqgoaGMsJGhIaCUQ-rdc5qC-oaseq8,14018
|
18
|
-
p115client/tool/request.py,sha256=rjXuQwRganE5Z-4rfgnyPFjE4jzdQSLdIs9s0cIDshU,7043
|
19
|
-
p115client/tool/upload.py,sha256=dbvYTD8TD_3iEGChUdchOXqnV0VLHX7TJlb2zBHduNM,15932
|
20
|
-
p115client/tool/util.py,sha256=0o9TrXdoPcljgxDDRdxRon41bq1OjuUYCWsR0XLfmPo,3357
|
21
|
-
p115client/tool/xys.py,sha256=NVwXXB1ZvFKQKcar1kQdDzlUN7xilGheO_eEeoMxjMw,10325
|
22
|
-
p115client/type.py,sha256=7kOp98uLaYqcTTCgCrb3DRcl8ukMpn7ibsnVvtw2nG8,6250
|
23
|
-
p115client-0.0.5.11.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
24
|
-
p115client-0.0.5.11.dist-info/METADATA,sha256=9HPewST9HgcH9KvyLMa7lDSh-8YJE8KsVcDUeTt-sBo,8236
|
25
|
-
p115client-0.0.5.11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
26
|
-
p115client-0.0.5.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|