entari-plugin-server 0.7.4__tar.gz → 0.7.5__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.
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/PKG-INFO +2 -2
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/pyproject.toml +2 -2
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/__init__.py +7 -4
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/LICENSE +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/README.md +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/README.md +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/_adapter.py +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/config.py +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/patch.py +0 -0
- {entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: entari-plugin-server
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.5
|
|
4
4
|
Summary: Entari plugin for running Satori Server
|
|
5
5
|
Keywords: server,adapters,satori,entari,plugin
|
|
6
6
|
Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
|
|
@@ -8,7 +8,7 @@ License: MIT
|
|
|
8
8
|
Project-URL: homepage, https://github.com/ArcletProject/entari-plugin-server
|
|
9
9
|
Project-URL: repository, https://github.com/ArcletProject/entari-plugin-server
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
|
-
Requires-Dist: arclet-entari
|
|
11
|
+
Requires-Dist: arclet-entari>=0.19.0rc1
|
|
12
12
|
Requires-Dist: satori-python-server<1.4.0,>=1.3.0
|
|
13
13
|
Provides-Extra: fastapi
|
|
14
14
|
Requires-Dist: fastapi>=0.116.1; extra == "fastapi"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "entari-plugin-server"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.5"
|
|
4
4
|
description = "Entari plugin for running Satori Server"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com" },
|
|
7
7
|
]
|
|
8
8
|
dependencies = [
|
|
9
|
-
"arclet-entari
|
|
9
|
+
"arclet-entari>=0.19.0rc1",
|
|
10
10
|
"satori-python-server<1.4.0,>=1.3.0",
|
|
11
11
|
]
|
|
12
12
|
requires-python = ">=3.10"
|
{entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/__init__.py
RENAMED
|
@@ -8,8 +8,8 @@ from typing import TYPE_CHECKING, Any, Callable, Optional, Union, cast
|
|
|
8
8
|
from arclet.entari.config.models.default import BasicConfModel
|
|
9
9
|
from typing_extensions import TypeAlias
|
|
10
10
|
|
|
11
|
-
from arclet.entari import
|
|
12
|
-
from arclet.entari.plugin import PluginRole
|
|
11
|
+
from arclet.entari import plugin
|
|
12
|
+
from arclet.entari.plugin import PluginRole, get_plugin
|
|
13
13
|
from arclet.entari.config import EntariConfig
|
|
14
14
|
from arclet.entari.config import config_model_validate
|
|
15
15
|
from arclet.entari import logger as log_m
|
|
@@ -29,13 +29,12 @@ DISPOSE: TypeAlias = Callable[[], None]
|
|
|
29
29
|
uvicorn.LoguruHandler = log_m.LoguruHandler
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
plg = Plugin.current()
|
|
33
32
|
plugin.declare_static()
|
|
34
33
|
plugin.metadata(
|
|
35
34
|
"server",
|
|
36
35
|
PluginRole.LIBRARY,
|
|
37
36
|
[{"name": "RF-Tar-Railt", "email": "rf_tar_railt@qq.com"}],
|
|
38
|
-
"0.7.
|
|
37
|
+
"0.7.5",
|
|
39
38
|
description="为 Entari 提供 Satori 服务器支持,基于此为 Entari 提供 ASGI 服务、适配器连接等功能",
|
|
40
39
|
urls={
|
|
41
40
|
"homepage": "https://github.com/ArcletProject/entari-plugin-server",
|
|
@@ -148,6 +147,8 @@ def replace_asgi(app: Union[ASGIApp, asgitypes.ASGI3Application]):
|
|
|
148
147
|
Args:
|
|
149
148
|
app (Any): 新的 ASGI 应用
|
|
150
149
|
"""
|
|
150
|
+
plg = get_plugin(1)
|
|
151
|
+
|
|
151
152
|
if server.status.blocking:
|
|
152
153
|
logger.warning("Server is blocking, cannot replace ASGI app")
|
|
153
154
|
return lambda: None
|
|
@@ -186,6 +187,7 @@ def add_route(
|
|
|
186
187
|
include_in_schema (bool, optional): 是否包含在 OpenAPI 文档中,默认为 True
|
|
187
188
|
kwargs (Any): 其他参数,例如 FastAPI 的路由参数
|
|
188
189
|
"""
|
|
190
|
+
plg = get_plugin(1)
|
|
189
191
|
|
|
190
192
|
def wrapper(endpoint: TCallable, /) -> TCallable:
|
|
191
193
|
app = cast(Starlette, server.app)
|
|
@@ -217,6 +219,7 @@ def add_websocket_route(
|
|
|
217
219
|
name (str, optional): 路由名称,默认为 None
|
|
218
220
|
kwargs (Any): 其他参数,例如 FastAPI 的路由参数
|
|
219
221
|
"""
|
|
222
|
+
plg = get_plugin(1)
|
|
220
223
|
|
|
221
224
|
def wrapper(endpoint: TCallable, /) -> TCallable:
|
|
222
225
|
app = cast(Starlette, server.app)
|
|
File without changes
|
|
File without changes
|
{entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/README.md
RENAMED
|
File without changes
|
{entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/_adapter.py
RENAMED
|
File without changes
|
{entari_plugin_server-0.7.4 → entari_plugin_server-0.7.5}/src/entari_plugin_server/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|