p115client 0.0.5.5.5__tar.gz → 0.0.5.6.1__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.
Files changed (22) hide show
  1. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/PKG-INFO +35 -2
  2. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/_upload.py +1 -1
  3. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/client.py +10682 -8495
  4. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/fs_files.py +24 -15
  5. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/pyproject.toml +2 -2
  6. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/readme.md +33 -0
  7. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/LICENSE +0 -0
  8. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/__init__.py +0 -0
  9. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/const.py +0 -0
  10. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/exception.py +0 -0
  11. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/py.typed +0 -0
  12. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/__init__.py +0 -0
  13. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/download.py +0 -0
  14. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/edit.py +0 -0
  15. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/export_dir.py +0 -0
  16. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/iterdir.py +0 -0
  17. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/life.py +0 -0
  18. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/pool.py +0 -0
  19. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/request.py +0 -0
  20. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/upload.py +0 -0
  21. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/xys.py +0 -0
  22. {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/type.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p115client
3
- Version: 0.0.5.5.5
3
+ Version: 0.0.5.6.1
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.6.1)
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)
43
- Requires-Dist: python-iterutils (>=0.1.7)
43
+ Requires-Dist: python-iterutils (>=0.1.8)
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)
@@ -106,6 +106,39 @@ from pathlib import Path
106
106
  client = P115Client(Path("~/115-cookies.txt").expanduser(), check_for_relogin=True)
107
107
  ```
108
108
 
109
+ 如果你有一个申请通过的开放接口的应用,则可以创建开放接口的客户端实例
110
+
111
+ 你可以直接从一个 `P115Client` 实例拿到授权(自动扫码登录并授权)
112
+
113
+ ```python
114
+ app_id = <开放接口应用的 AppID>
115
+ client_open = client.login_another_open(app_id)
116
+ ```
117
+
118
+ 也可以用一个已经授权得到的 `refresh_token` (一次性使用)
119
+
120
+ ```python
121
+ from p115client import P115OpenClient
122
+
123
+ client_open = P115OpenClient(refresh_token)
124
+ ```
125
+
126
+ 或者手动扫码登录
127
+
128
+ ```python
129
+ client_open = P115OpenClient(app_id)
130
+ ```
131
+
132
+ 所以综上,推荐的初始化代码为
133
+
134
+ ```python
135
+ from p115client import P115Client, P115OpenClient
136
+ from pathlib import Path
137
+
138
+ client = P115Client(Path("~/115-cookies.txt").expanduser(), check_for_relogin=True)
139
+ client_open = client.login_another_open(app_id)
140
+ ```
141
+
109
142
  ### 2. 接口调用
110
143
 
111
144
  所有需要直接或间接执行 HTTP 请求的接口,都有同步和异步的调用方式
@@ -917,7 +917,7 @@ def oss_multipart_upload(
917
917
  async_=async_, # type: ignore
918
918
  **request_kwargs,
919
919
  ))
920
- except Exception as e:
920
+ except BaseException as e:
921
921
  raise MultipartUploadAbort(resume_data) from e
922
922
  finally:
923
923
  if close_reporthook is not None: