huace-aigc-auth-client 1.1.11__py3-none-any.whl → 1.1.12__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.
- huace_aigc_auth_client/__init__.py +38 -20
- {huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/METADATA +1 -1
- {huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/RECORD +6 -6
- {huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/WHEEL +0 -0
- {huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/licenses/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/top_level.txt +0 -0
|
@@ -67,16 +67,31 @@ from .legacy_adapter import (
|
|
|
67
67
|
create_sync_config,
|
|
68
68
|
create_default_field_mappings,
|
|
69
69
|
)
|
|
70
|
+
# fastapi 相关功能是可选的,如果未安装 fastapi 则跳过
|
|
71
|
+
try:
|
|
72
|
+
from .webhook import (
|
|
73
|
+
register_webhook_router,
|
|
74
|
+
verify_webhook_signature,
|
|
75
|
+
)
|
|
76
|
+
_fastapi_available = True
|
|
77
|
+
except ImportError:
|
|
78
|
+
_fastapi_available = False
|
|
79
|
+
# 提供占位符,避免 __all__ 导出时出错
|
|
80
|
+
register_webhook_router = None
|
|
81
|
+
verify_webhook_signature = None
|
|
70
82
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
# Flask 相关功能是可选的,如果未安装 flask 则跳过
|
|
84
|
+
try:
|
|
85
|
+
from .webhook_flask import (
|
|
86
|
+
create_flask_webhook_blueprint,
|
|
87
|
+
register_flask_webhook_routes,
|
|
88
|
+
)
|
|
89
|
+
_flask_available = True
|
|
90
|
+
except ImportError:
|
|
91
|
+
_flask_available = False
|
|
92
|
+
# 提供占位符,避免 __all__ 导出时出错
|
|
93
|
+
create_flask_webhook_blueprint = None
|
|
94
|
+
register_flask_webhook_routes = None
|
|
80
95
|
|
|
81
96
|
def setLogger(log):
|
|
82
97
|
"""
|
|
@@ -107,17 +122,20 @@ def setLogger(log):
|
|
|
107
122
|
except Exception as e:
|
|
108
123
|
print(f"Failed to set logger for legacy_adapter module: {e}")
|
|
109
124
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
125
|
+
if _fastapi_available:
|
|
126
|
+
try:
|
|
127
|
+
from .webhook import setLogger as webhook_setLogger
|
|
128
|
+
webhook_setLogger(log)
|
|
129
|
+
except Exception as e:
|
|
130
|
+
print(f"Failed to set logger for webhook module: {e}")
|
|
115
131
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
# 只在 flask 可用时设置 flask 模块的 logger
|
|
133
|
+
if _flask_available:
|
|
134
|
+
try:
|
|
135
|
+
from .webhook_flask import setLogger as webhook_flask_setLogger
|
|
136
|
+
webhook_flask_setLogger(log)
|
|
137
|
+
except Exception as e:
|
|
138
|
+
print(f"Failed to set logger for webhook_flask module: {e}")
|
|
121
139
|
|
|
122
140
|
|
|
123
141
|
__all__ = [
|
|
@@ -150,4 +168,4 @@ __all__ = [
|
|
|
150
168
|
# Logger 设置
|
|
151
169
|
"setLogger",
|
|
152
170
|
]
|
|
153
|
-
__version__ = "1.1.
|
|
171
|
+
__version__ = "1.1.12"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
huace_aigc_auth_client/__init__.py,sha256=
|
|
1
|
+
huace_aigc_auth_client/__init__.py,sha256=alKZbosXaypCFR2O3uyS8-2i-KDb2i8im9BKcyTTaE4,4540
|
|
2
2
|
huace_aigc_auth_client/legacy_adapter.py,sha256=1YRfa71IP-LkUxMoFB5uFhloikXIl3ZE01fQ_CXppBs,23455
|
|
3
3
|
huace_aigc_auth_client/sdk.py,sha256=ypClZfQm4Ux4db8XDP51I5Cuk1Uc9F2VPgECpXXphkQ,23272
|
|
4
4
|
huace_aigc_auth_client/webhook.py,sha256=XQZYEbMoqIdqZWCGSTcedeDKJpDbUVSq5g08g-6Qucg,4124
|
|
5
5
|
huace_aigc_auth_client/webhook_flask.py,sha256=Iosu4dBtRhQZM_ytn-bn82MpVsyOiV28FBnt7Tfh31U,7225
|
|
6
|
-
huace_aigc_auth_client-1.1.
|
|
7
|
-
huace_aigc_auth_client-1.1.
|
|
8
|
-
huace_aigc_auth_client-1.1.
|
|
9
|
-
huace_aigc_auth_client-1.1.
|
|
10
|
-
huace_aigc_auth_client-1.1.
|
|
6
|
+
huace_aigc_auth_client-1.1.12.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
+
huace_aigc_auth_client-1.1.12.dist-info/METADATA,sha256=qknk0q-tOmAYEdTCLOBRHvRZZwa-qEtpTPhfVkgO4N8,22971
|
|
8
|
+
huace_aigc_auth_client-1.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
huace_aigc_auth_client-1.1.12.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
+
huace_aigc_auth_client-1.1.12.dist-info/RECORD,,
|
|
File without changes
|
{huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{huace_aigc_auth_client-1.1.11.dist-info → huace_aigc_auth_client-1.1.12.dist-info}/top_level.txt
RENAMED
|
File without changes
|