bizyengine 1.2.71__py3-none-any.whl → 1.2.72__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.
@@ -1227,3 +1227,19 @@ class APIClient:
1227
1227
  except asyncio.exceptions.TimeoutError:
1228
1228
  print("Request to fetch models timed out")
1229
1229
  return []
1230
+
1231
+ async def get_plugin_tmp_token(self, api_key: str = None):
1232
+ url = f"{BIZYAIR_X_SERVER}/auth/plugin_tmp_token"
1233
+ headers, err = self.auth_header(api_key=api_key)
1234
+ if err is not None:
1235
+ print(f"get_plugin_tmp_token: error getting headers: {err}")
1236
+ return None, err
1237
+ try:
1238
+ data, err = await self.do_post(url, headers=headers)
1239
+ if err is not None:
1240
+ print(f"get_plugin_tmp_token error: {err}")
1241
+ return None, err
1242
+ return data["data"], None
1243
+ except aiohttp.ClientError as e:
1244
+ print(f"get_plugin_tmp_token error: {e}")
1245
+ return None, errnos.GET_PLUGIN_TMP_TOKEN
@@ -500,3 +500,10 @@ class errnos:
500
500
  None,
501
501
  {"en": "Streaming connection closed unexpectedly", "zh": "流式连接异常关闭"},
502
502
  )
503
+
504
+ GET_PLUGIN_TMP_TOKEN = ErrorNo(
505
+ 500,
506
+ 500161,
507
+ None,
508
+ {"en": "Failed to get tmp token", "zh": "获取临时令牌失败"},
509
+ )
@@ -1342,6 +1342,16 @@ class BizyAirServer:
1342
1342
 
1343
1343
  return OKResponse(resp)
1344
1344
 
1345
+ @self.prompt_server.routes.post(f"/{API_PREFIX}/auth/plugin_tmp_token")
1346
+ async def get_plugin_tmp_token(request):
1347
+ api_key = request.rel_url.query.get("api_key", "")
1348
+
1349
+ resp, err = await self.api_client.get_plugin_tmp_token(api_key=api_key)
1350
+ if err is not None:
1351
+ return ErrResponse(err)
1352
+
1353
+ return OKResponse(resp)
1354
+
1345
1355
  async def send_json(self, event, data, sid=None):
1346
1356
  message = {"type": event, "data": data}
1347
1357
 
bizyengine/version.txt CHANGED
@@ -1 +1 @@
1
- 1.2.71
1
+ 1.2.72
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizyengine
3
- Version: 1.2.71
3
+ Version: 1.2.72
4
4
  Summary: [a/BizyAir](https://github.com/siliconflow/BizyAir) Comfy Nodes that can run in any environment.
5
5
  Author-email: SiliconFlow <yaochi@siliconflow.cn>
6
6
  Project-URL: Repository, https://github.com/siliconflow/BizyAir
@@ -1,13 +1,13 @@
1
1
  bizyengine/__init__.py,sha256=GP9V-JM07fz7uv_qTB43QEA2rKdrVJxi5I7LRnn_3ZQ,914
2
- bizyengine/version.txt,sha256=VZ2LG2EeQz_WRAh5_a0VSfKb4zrw1bm78ky8aM0_qL8,7
2
+ bizyengine/version.txt,sha256=a7iR7IBhAjmgseNlnvFyQ7DcWKZVPC_fBtzuP4Q3RPY,7
3
3
  bizyengine/bizy_server/__init__.py,sha256=SP9oSblnPo4KQyh7yOGD26YCskFAcQHAZy04nQBNRIw,200
4
- bizyengine/bizy_server/api_client.py,sha256=Z7G5IjaEqSJkF6nLLw2R3bpgBAOi5ClQiUbel6NMXmE,43932
5
- bizyengine/bizy_server/errno.py,sha256=RIyvegX3lzpx_1L1q2XVvu3on0kvYgKiUQ8U3ZtyF68,16823
4
+ bizyengine/bizy_server/api_client.py,sha256=fF2VApJjPcPWGQwYWSEaIN12c8WT95lj1_QHX83WbeQ,44630
5
+ bizyengine/bizy_server/errno.py,sha256=ikb4Z3MRMTjosi9AC1epaOwE3kJsD6CcFcFp56AKF-Y,16986
6
6
  bizyengine/bizy_server/error_handler.py,sha256=MGrfO1AEqbfEgMWPL8B6Ypew_zHiQAdYGlhN9bZohrY,167
7
7
  bizyengine/bizy_server/execution.py,sha256=ayaEf6eGJKQsVZV-1_UlGlvwwmlH7FEek31Uq-MbUjA,1644
8
8
  bizyengine/bizy_server/profile.py,sha256=f4juAzJ73gCm0AhagYpt9WnG8HEI6xze_U96-omBLqU,3044
9
9
  bizyengine/bizy_server/resp.py,sha256=iOFT5Ud7VJBP2uqkojJIgc3y2ifMjjEXoj0ewneL9lc,710
10
- bizyengine/bizy_server/server.py,sha256=ZLWTDRtTGV601JGcJYJsp_NUgsJyKoDdR7KrStLzW5g,57490
10
+ bizyengine/bizy_server/server.py,sha256=tdr_Um6aRed1YVMo7D9TpUyAu1ZQEyiHbQhyDfhtVoY,57877
11
11
  bizyengine/bizy_server/stream_response.py,sha256=H2XHqlVRtQMhgdztAuG7l8-iV_Pm42u2x6WJ0gNVIW0,9654
12
12
  bizyengine/bizy_server/utils.py,sha256=t3y3ZTDzFa8K4wXlzgLVaFNCizgylsKsd9K3rLL4sGw,3986
13
13
  bizyengine/bizyair_extras/__init__.py,sha256=9iPmEyR7F1IXbUaBNS90ivW9ul18GcuWFxRfFv2ieAw,1011
@@ -103,7 +103,7 @@ bizyengine/misc/route_sam.py,sha256=-bMIR2QalfnszipGxSxvDAHGJa5gPSrjkYPb5baaRg4,
103
103
  bizyengine/misc/segment_anything.py,sha256=wNKYwlYPMszfwj23524geFZJjZaG4eye65SGaUnh77I,8941
104
104
  bizyengine/misc/supernode.py,sha256=STN9gaxfTSErH8OiHeZa47d8z-G9S0I7fXuJvHQOBFM,4532
105
105
  bizyengine/misc/utils.py,sha256=nXXTPkj4WBvds4EWjI9c-ydeWwmXl8Vwrdu-4Fh62g8,12914
106
- bizyengine-1.2.71.dist-info/METADATA,sha256=tYEVOG70_usULu73h-QnlY6D7NWCEsOPDZ7OMO-6sgs,735
107
- bizyengine-1.2.71.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
108
- bizyengine-1.2.71.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
109
- bizyengine-1.2.71.dist-info/RECORD,,
106
+ bizyengine-1.2.72.dist-info/METADATA,sha256=avhbzY9k0yg3bnxWYcckNHBkPYIghct_pVI1FfR_OiE,735
107
+ bizyengine-1.2.72.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
108
+ bizyengine-1.2.72.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
109
+ bizyengine-1.2.72.dist-info/RECORD,,