sycommon-python-lib 0.1.46__py3-none-any.whl → 0.1.57b1__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.
- sycommon/config/Config.py +29 -4
- sycommon/config/LangfuseConfig.py +15 -0
- sycommon/config/RerankerConfig.py +1 -0
- sycommon/config/SentryConfig.py +13 -0
- sycommon/database/async_base_db_service.py +36 -0
- sycommon/database/async_database_service.py +96 -0
- sycommon/llm/__init__.py +0 -0
- sycommon/llm/embedding.py +204 -0
- sycommon/llm/get_llm.py +37 -0
- sycommon/llm/llm_logger.py +126 -0
- sycommon/llm/llm_tokens.py +119 -0
- sycommon/llm/struct_token.py +192 -0
- sycommon/llm/sy_langfuse.py +103 -0
- sycommon/llm/usage_token.py +117 -0
- sycommon/logging/async_sql_logger.py +65 -0
- sycommon/logging/kafka_log.py +200 -434
- sycommon/logging/logger_levels.py +23 -0
- sycommon/middleware/context.py +2 -0
- sycommon/middleware/exception.py +10 -16
- sycommon/middleware/timeout.py +2 -1
- sycommon/middleware/traceid.py +179 -51
- sycommon/notice/__init__.py +0 -0
- sycommon/notice/uvicorn_monitor.py +200 -0
- sycommon/rabbitmq/rabbitmq_client.py +267 -290
- sycommon/rabbitmq/rabbitmq_pool.py +277 -465
- sycommon/rabbitmq/rabbitmq_service.py +23 -891
- sycommon/rabbitmq/rabbitmq_service_client_manager.py +211 -0
- sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +73 -0
- sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +285 -0
- sycommon/rabbitmq/rabbitmq_service_core.py +117 -0
- sycommon/rabbitmq/rabbitmq_service_producer_manager.py +238 -0
- sycommon/sentry/__init__.py +0 -0
- sycommon/sentry/sy_sentry.py +35 -0
- sycommon/services.py +144 -115
- sycommon/synacos/feign.py +18 -7
- sycommon/synacos/feign_client.py +26 -8
- sycommon/synacos/nacos_client_base.py +119 -0
- sycommon/synacos/nacos_config_manager.py +107 -0
- sycommon/synacos/nacos_heartbeat_manager.py +144 -0
- sycommon/synacos/nacos_service.py +65 -769
- sycommon/synacos/nacos_service_discovery.py +157 -0
- sycommon/synacos/nacos_service_registration.py +270 -0
- sycommon/tools/env.py +62 -0
- sycommon/tools/merge_headers.py +117 -0
- sycommon/tools/snowflake.py +238 -23
- {sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/METADATA +18 -11
- sycommon_python_lib-0.1.57b1.dist-info/RECORD +89 -0
- sycommon_python_lib-0.1.46.dist-info/RECORD +0 -59
- {sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/WHEEL +0 -0
- {sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/entry_points.txt +0 -0
- {sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/top_level.txt +0 -0
sycommon/tools/snowflake.py
CHANGED
|
@@ -1,33 +1,248 @@
|
|
|
1
|
-
import
|
|
1
|
+
import time
|
|
2
|
+
import threading
|
|
3
|
+
import socket
|
|
4
|
+
import hashlib
|
|
5
|
+
import random
|
|
6
|
+
import os
|
|
7
|
+
from typing import Optional, Type, Any
|
|
8
|
+
from os import environ
|
|
9
|
+
import psutil
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ClassProperty:
|
|
13
|
+
"""支持通过 类.属性 的方式访问,无需实例化"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, func):
|
|
16
|
+
self.func = func
|
|
17
|
+
|
|
18
|
+
def __get__(self, instance: Any, cls: Type) -> str:
|
|
19
|
+
return self.func(cls)
|
|
2
20
|
|
|
3
21
|
|
|
4
22
|
class Snowflake:
|
|
5
|
-
"""
|
|
6
|
-
|
|
23
|
+
"""
|
|
24
|
+
雪花算法生成器(高并发终极优化版 - 修复语法错误)
|
|
7
25
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
26
|
+
终极优化点:
|
|
27
|
+
1. 解决溢出死锁:当序列号溢出时,释放锁自旋等待,避免阻塞其他线程。
|
|
28
|
+
2. 锁内原子更新:确保时钟回拨判断与状态更新的原子性。
|
|
29
|
+
3. 移除 sleep:全流程无休眠,纯自旋保证极致吞吐。
|
|
30
|
+
"""
|
|
31
|
+
START_TIMESTAMP = 1388534400000 # 2014-01-01 00:00:00
|
|
32
|
+
SEQUENCE_BITS = 12
|
|
33
|
+
MACHINE_ID_BITS = 10
|
|
34
|
+
MAX_MACHINE_ID = (1 << MACHINE_ID_BITS) - 1 # 0~1023
|
|
35
|
+
MAX_SEQUENCE = (1 << SEQUENCE_BITS) - 1 # 4095
|
|
36
|
+
MACHINE_ID_SHIFT = SEQUENCE_BITS
|
|
37
|
+
TIMESTAMP_SHIFT = SEQUENCE_BITS + MACHINE_ID_BITS
|
|
38
|
+
CLOCK_BACKWARD_THRESHOLD = 5
|
|
39
|
+
_MAX_JAVA_LONG = 9223372036854775807
|
|
40
|
+
|
|
41
|
+
_instance = None
|
|
42
|
+
_instance_lock = threading.Lock()
|
|
43
|
+
|
|
44
|
+
def __init__(self, machine_id: Optional[int] = None):
|
|
45
|
+
self._validate_timestamp_range()
|
|
46
|
+
if machine_id is None:
|
|
47
|
+
machine_id = self._get_k8s_machine_id()
|
|
48
|
+
if not (0 <= machine_id <= self.MAX_MACHINE_ID):
|
|
49
|
+
raise ValueError(f"机器ID必须在0~{self.MAX_MACHINE_ID}之间")
|
|
50
|
+
|
|
51
|
+
self.machine_id = machine_id
|
|
52
|
+
self.last_timestamp = -1
|
|
53
|
+
self.sequence = 0
|
|
54
|
+
self.lock = threading.Lock()
|
|
55
|
+
|
|
56
|
+
def _validate_timestamp_range(self):
|
|
57
|
+
max_support_timestamp = self.START_TIMESTAMP + \
|
|
58
|
+
(1 << (64 - self.TIMESTAMP_SHIFT)) - 1
|
|
59
|
+
current_timestamp = self._get_current_timestamp()
|
|
60
|
+
if current_timestamp > max_support_timestamp:
|
|
61
|
+
raise RuntimeError(f"当前时间戳({current_timestamp})超过支持范围")
|
|
62
|
+
|
|
63
|
+
def _get_k8s_machine_id(self) -> int:
|
|
64
|
+
pod_name = environ.get("POD_NAME")
|
|
65
|
+
if pod_name:
|
|
66
|
+
return self._hash_to_machine_id(pod_name)
|
|
67
|
+
pod_ip = environ.get("POD_IP")
|
|
68
|
+
if pod_ip:
|
|
69
|
+
return self._hash_to_machine_id(pod_ip)
|
|
70
|
+
try:
|
|
71
|
+
local_ip = self._get_local_internal_ip()
|
|
72
|
+
if local_ip:
|
|
73
|
+
return self._hash_to_machine_id(local_ip)
|
|
74
|
+
except Exception:
|
|
75
|
+
pass
|
|
76
|
+
hostname = socket.gethostname()
|
|
77
|
+
if hostname:
|
|
78
|
+
return self._hash_to_machine_id(hostname)
|
|
79
|
+
fallback_text = f"{os.getpid()}_{int(time.time()*1000)}_{random.randint(0, 100000)}"
|
|
80
|
+
return self._hash_to_machine_id(fallback_text)
|
|
81
|
+
|
|
82
|
+
def _get_local_internal_ip(self) -> Optional[str]:
|
|
83
|
+
try:
|
|
84
|
+
net_if_addrs = psutil.net_if_addrs()
|
|
85
|
+
for interface_name, addrs in net_if_addrs.items():
|
|
86
|
+
if (interface_name.lower().startswith("lo")
|
|
87
|
+
or interface_name.lower() in ["loopback", "virtual", "docker", "veth"]):
|
|
88
|
+
continue
|
|
89
|
+
for addr in addrs:
|
|
90
|
+
if addr.family == psutil.AF_INET:
|
|
91
|
+
ip = addr.address
|
|
92
|
+
if ip and not ip.startswith('127.') and not ip.startswith('0.'):
|
|
93
|
+
return ip
|
|
94
|
+
return None
|
|
95
|
+
except Exception:
|
|
96
|
+
return self._get_local_ip_fallback()
|
|
97
|
+
|
|
98
|
+
def _get_local_ip_fallback(self) -> Optional[str]:
|
|
99
|
+
try:
|
|
100
|
+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
101
|
+
s.connect(("10.0.0.1", 80))
|
|
102
|
+
local_ip = s.getsockname()[0]
|
|
103
|
+
s.close()
|
|
104
|
+
if not local_ip.startswith('127.') and not local_ip.startswith('0.'):
|
|
105
|
+
return local_ip
|
|
106
|
+
except Exception:
|
|
107
|
+
pass
|
|
108
|
+
try:
|
|
109
|
+
hostname = socket.gethostname()
|
|
110
|
+
ip_list = socket.gethostbyname_ex(hostname)[2]
|
|
111
|
+
for ip in ip_list:
|
|
112
|
+
if not ip.startswith('127.') and not ip.startswith('0.'):
|
|
113
|
+
return ip
|
|
114
|
+
except Exception:
|
|
115
|
+
pass
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
def _hash_to_machine_id(self, text: str) -> int:
|
|
119
|
+
hash_bytes = hashlib.md5(text.encode("utf-8")).digest()
|
|
120
|
+
return int.from_bytes(hash_bytes[:4], byteorder="big") % (self.MAX_MACHINE_ID + 1)
|
|
121
|
+
|
|
122
|
+
def _get_current_timestamp(self) -> int:
|
|
123
|
+
return int(time.time() * 1000)
|
|
124
|
+
|
|
125
|
+
def generate_id(self) -> int:
|
|
126
|
+
"""
|
|
127
|
+
生成雪花ID(高并发优化版)
|
|
128
|
+
使用 while True 循环来处理序列号溢出时的重试逻辑
|
|
129
|
+
"""
|
|
11
130
|
while True:
|
|
12
|
-
#
|
|
13
|
-
|
|
131
|
+
# 1. 快速获取当前时间
|
|
132
|
+
current_timestamp = self._get_current_timestamp()
|
|
133
|
+
|
|
134
|
+
# 2. 加锁,保证状态更新的原子性
|
|
135
|
+
with self.lock:
|
|
136
|
+
# 读取当前状态(快照)
|
|
137
|
+
last_timestamp = self.last_timestamp
|
|
138
|
+
sequence = self.sequence
|
|
14
139
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
140
|
+
# 2.1 处理时钟回拨
|
|
141
|
+
time_diff = last_timestamp - current_timestamp
|
|
142
|
+
if time_diff > 0:
|
|
143
|
+
if time_diff > self.CLOCK_BACKWARD_THRESHOLD:
|
|
144
|
+
# 大幅回拨:直接“借用”未来1ms
|
|
145
|
+
current_timestamp = last_timestamp + 1
|
|
146
|
+
else:
|
|
147
|
+
# 微小回拨:锁内自旋等待追上(通常很快)
|
|
148
|
+
while current_timestamp <= last_timestamp:
|
|
149
|
+
current_timestamp = self._get_current_timestamp()
|
|
18
150
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
151
|
+
# 2.2 计算序列号
|
|
152
|
+
if current_timestamp == last_timestamp:
|
|
153
|
+
# 同一毫秒内
|
|
154
|
+
sequence = (sequence + 1) & self.MAX_SEQUENCE
|
|
155
|
+
if sequence == 0:
|
|
156
|
+
self.lock.release() # 手动释放锁
|
|
157
|
+
|
|
158
|
+
# 锁外自旋等待下一毫秒
|
|
159
|
+
while current_timestamp <= last_timestamp:
|
|
160
|
+
current_timestamp = self._get_current_timestamp()
|
|
161
|
+
|
|
162
|
+
# 等待到了新毫秒,进入下一轮循环(continue 默认行为),重新抢锁竞争
|
|
163
|
+
continue
|
|
164
|
+
|
|
165
|
+
elif current_timestamp > last_timestamp:
|
|
166
|
+
# 时间推进,重置序列号
|
|
167
|
+
sequence = 0
|
|
168
|
+
self.last_timestamp = current_timestamp
|
|
169
|
+
self.sequence = sequence
|
|
170
|
+
else:
|
|
171
|
+
# current < last 的情况通常已被回拨逻辑处理
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
# 2.4 生成 ID
|
|
175
|
+
snowflake_id = (
|
|
176
|
+
((current_timestamp - self.START_TIMESTAMP)
|
|
177
|
+
<< self.TIMESTAMP_SHIFT)
|
|
178
|
+
| (self.machine_id << self.MACHINE_ID_SHIFT)
|
|
179
|
+
| sequence
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
# 更新全局状态(如果是同一毫秒)
|
|
183
|
+
if current_timestamp == self.last_timestamp:
|
|
184
|
+
self.sequence = sequence
|
|
185
|
+
|
|
186
|
+
# 成功生成 ID,退出循环
|
|
187
|
+
return snowflake_id
|
|
188
|
+
|
|
189
|
+
@staticmethod
|
|
190
|
+
def parse_id(snowflake_id: int) -> dict:
|
|
191
|
+
from datetime import datetime
|
|
192
|
+
sequence = snowflake_id & Snowflake.MAX_SEQUENCE
|
|
193
|
+
machine_id = (snowflake_id >>
|
|
194
|
+
Snowflake.MACHINE_ID_SHIFT) & Snowflake.MAX_MACHINE_ID
|
|
195
|
+
timestamp = (snowflake_id >> Snowflake.TIMESTAMP_SHIFT) + \
|
|
196
|
+
Snowflake.START_TIMESTAMP
|
|
197
|
+
generate_time = datetime.fromtimestamp(
|
|
198
|
+
timestamp / 1000).strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
|
|
199
|
+
return {
|
|
200
|
+
"snowflake_id": snowflake_id,
|
|
201
|
+
"generate_time": generate_time,
|
|
202
|
+
"machine_id": machine_id,
|
|
203
|
+
"sequence": sequence,
|
|
204
|
+
"is_java_long_safe": snowflake_id <= Snowflake._MAX_JAVA_LONG
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@classmethod
|
|
208
|
+
def next_id(cls) -> str:
|
|
209
|
+
if cls._instance is None:
|
|
210
|
+
with cls._instance_lock:
|
|
211
|
+
if cls._instance is None:
|
|
212
|
+
cls._instance = cls()
|
|
213
|
+
return str(cls._instance.generate_id())
|
|
214
|
+
|
|
215
|
+
@ClassProperty
|
|
216
|
+
def id(cls) -> str:
|
|
217
|
+
return cls.next_id()
|
|
23
218
|
|
|
24
219
|
|
|
25
|
-
# 使用示例
|
|
26
220
|
if __name__ == "__main__":
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
221
|
+
import concurrent.futures
|
|
222
|
+
|
|
223
|
+
print("=== 高并发终极版 Snowflake 性能测试 ===")
|
|
224
|
+
count = 100000
|
|
225
|
+
workers = 100
|
|
226
|
+
|
|
227
|
+
ids = []
|
|
228
|
+
start_time = time.perf_counter()
|
|
229
|
+
|
|
230
|
+
def task():
|
|
231
|
+
return Snowflake.id
|
|
232
|
+
|
|
233
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
|
|
234
|
+
futures = [executor.submit(task) for _ in range(count)]
|
|
235
|
+
for future in concurrent.futures.as_completed(futures):
|
|
236
|
+
ids.append(future.result())
|
|
237
|
+
|
|
238
|
+
end_time = time.perf_counter()
|
|
239
|
+
duration = end_time - start_time
|
|
240
|
+
|
|
241
|
+
unique_count = len(set(ids))
|
|
242
|
+
print(f"生成数量: {len(ids)}")
|
|
243
|
+
print(f"唯一ID数量: {unique_count}")
|
|
244
|
+
print(f"是否有重复: {'是 ❌' if unique_count != len(ids) else '否 ✅'}")
|
|
245
|
+
print(f"总耗时: {duration:.4f} 秒")
|
|
246
|
+
print(f"吞吐量 (QPS): {len(ids) / duration:,.2f}")
|
|
247
|
+
print("\n最后一个ID解析:")
|
|
248
|
+
print(Snowflake.parse_id(int(ids[-1])))
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.57b1
|
|
4
4
|
Summary: Add your description here
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
Requires-Dist: aio-pika>=9.5.8
|
|
8
|
-
Requires-Dist: aiohttp>=3.13.
|
|
8
|
+
Requires-Dist: aiohttp>=3.13.3
|
|
9
|
+
Requires-Dist: aiomysql>=0.3.2
|
|
9
10
|
Requires-Dist: decorator>=5.2.1
|
|
10
|
-
Requires-Dist: fastapi>=0.
|
|
11
|
-
Requires-Dist: kafka-python>=2.
|
|
11
|
+
Requires-Dist: fastapi>=0.128.0
|
|
12
|
+
Requires-Dist: kafka-python>=2.3.0
|
|
13
|
+
Requires-Dist: langchain>=1.2.3
|
|
14
|
+
Requires-Dist: langchain-core>=1.2.7
|
|
15
|
+
Requires-Dist: langchain-openai>=1.1.7
|
|
16
|
+
Requires-Dist: langfuse>=3.11.2
|
|
17
|
+
Requires-Dist: langgraph>=1.0.6
|
|
12
18
|
Requires-Dist: loguru>=0.7.3
|
|
13
19
|
Requires-Dist: mysql-connector-python>=9.5.0
|
|
14
|
-
Requires-Dist: nacos-sdk-python
|
|
15
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: nacos-sdk-python<3.0,>=2.0.9
|
|
21
|
+
Requires-Dist: psutil>=7.2.1
|
|
22
|
+
Requires-Dist: pydantic>=2.12.5
|
|
16
23
|
Requires-Dist: python-dotenv>=1.2.1
|
|
17
24
|
Requires-Dist: pyyaml>=6.0.3
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist: uvicorn>=0.
|
|
25
|
+
Requires-Dist: sentry-sdk[fastapi]>=2.49.0
|
|
26
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.45
|
|
27
|
+
Requires-Dist: starlette>=0.50.0
|
|
28
|
+
Requires-Dist: uvicorn>=0.40.0
|
|
22
29
|
|
|
23
30
|
# sycommon-python-lib
|
|
24
31
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
command/cli.py,sha256=bP2LCLkRvfETIwWkVD70q5xFxMI4D3BpH09Ws1f-ENc,5849
|
|
2
|
+
sycommon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
sycommon/services.py,sha256=F1fwBqVd7luywJjXeK7rF_7FzBePstyEfxXBR_5o04Q,12330
|
|
4
|
+
sycommon/config/Config.py,sha256=L4vlGsVFL1ZHEULxvE8-VyLF-wDBuOMZGmWXIldqfn8,4014
|
|
5
|
+
sycommon/config/DatabaseConfig.py,sha256=ILiUuYT9_xJZE2W-RYuC3JCt_YLKc1sbH13-MHIOPhg,804
|
|
6
|
+
sycommon/config/EmbeddingConfig.py,sha256=gPKwiDYbeu1GpdIZXMmgqM7JqBIzCXi0yYuGRLZooMI,362
|
|
7
|
+
sycommon/config/LLMConfig.py,sha256=yU-aIqePIeF6msfRVEtGq7SXZVDfHyTi6JduKjhMO_4,371
|
|
8
|
+
sycommon/config/LangfuseConfig.py,sha256=t2LulAtnMUvIINOKHXNWlT5PtgNb7IuaHURjWlbma38,370
|
|
9
|
+
sycommon/config/MQConfig.py,sha256=_RDcmIdyWKjmgM5ZnriOoI-DpaxgXs7CD0awdAD6z88,252
|
|
10
|
+
sycommon/config/RerankerConfig.py,sha256=35sVwzus2IscvTHnCG63Orl2pC-pMsrVi6wAGDmOH3U,341
|
|
11
|
+
sycommon/config/SentryConfig.py,sha256=OsLb3G9lTsCSZ7tWkcXWJHmvfILQopBxje5pjnkFJfo,320
|
|
12
|
+
sycommon/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
sycommon/database/async_base_db_service.py,sha256=w6ONUiTtF4-bXRnkBt9QpL9BAy0XUDbQG7F9Hf2rfjw,1337
|
|
14
|
+
sycommon/database/async_database_service.py,sha256=4Ag5PH6DFEcJOXR8MRF9V_Jho5uCoU9Ibo3PqulDsXw,3916
|
|
15
|
+
sycommon/database/base_db_service.py,sha256=J5ELHMNeGfzA6zVcASPSPZ0XNKrRY3_gdGmVkZw3Mto,946
|
|
16
|
+
sycommon/database/database_service.py,sha256=mun5vgM7nkuH6_UyHLHqQ2Qk_5gRgMxJu4_obIKLT6o,3253
|
|
17
|
+
sycommon/health/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
+
sycommon/health/health_check.py,sha256=EhfbhspRpQiKJaxdtE-PzpKQO_ucaFKtQxIm16F5Mpk,391
|
|
19
|
+
sycommon/health/metrics.py,sha256=fHqO73JuhoZkNPR-xIlxieXiTCvttq-kG-tvxag1s1s,268
|
|
20
|
+
sycommon/health/ping.py,sha256=FTlnIKk5y1mPfS1ZGOeT5IM_2udF5aqVLubEtuBp18M,250
|
|
21
|
+
sycommon/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
sycommon/llm/embedding.py,sha256=HknwDqXmRQcAZ8-6d8wZ6n7Bv7HtxTajDt1vvzHGeFQ,8411
|
|
23
|
+
sycommon/llm/get_llm.py,sha256=C48gt9GCwEpR26M-cUjM74_t-el18ZvlwpGhcQfR3gs,1054
|
|
24
|
+
sycommon/llm/llm_logger.py,sha256=n4UeNy_-g4oHQOsw-VUzF4uo3JVRLtxaMp1FcI8FiEo,5437
|
|
25
|
+
sycommon/llm/llm_tokens.py,sha256=-udDyFcmyzx6UAwIi6_d_wwI5kMd5w0-WcS2soVPQxg,4309
|
|
26
|
+
sycommon/llm/struct_token.py,sha256=jlpZnTOLDmRDdrCuxZe-1pQopd6OmCM9B_gWZ48CnEQ,7655
|
|
27
|
+
sycommon/llm/sy_langfuse.py,sha256=NZv6ydfn3-cxqQvuB5WdnM9GYliO9qB_RWh_XqIS3VU,3692
|
|
28
|
+
sycommon/llm/usage_token.py,sha256=n0hytuaHI4tJi6wuOS3bd-yWzQjZ-lx5w9egHs8uYgg,5140
|
|
29
|
+
sycommon/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
sycommon/logging/async_sql_logger.py,sha256=_OY36XkUm__U3NhMgiecy-qd-nptZ_0gpE3J8lGAr58,2619
|
|
31
|
+
sycommon/logging/kafka_log.py,sha256=gfOqdZe0HJ3PkIFfnNWG4DZVadxsCKJ6AmelR7_Z1Xs,9960
|
|
32
|
+
sycommon/logging/logger_levels.py,sha256=_-uQ_T1N8NkNgcAmLrMmJ83nHTDw5ZNvXFPvdk89XGY,1144
|
|
33
|
+
sycommon/logging/logger_wrapper.py,sha256=TiHsrIIHiQMzXgXK12-0KIpU9GhwQJOoHslakzmq2zc,357
|
|
34
|
+
sycommon/logging/sql_logger.py,sha256=aEU3OGnI_51Tjyuuf4FpUi9KPTceFRuKAOyQbPzGhzM,2021
|
|
35
|
+
sycommon/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
+
sycommon/middleware/context.py,sha256=sc1UjN55dYww2tT9KdFMJV8mgpGro67SnETzbVzty-s,155
|
|
37
|
+
sycommon/middleware/cors.py,sha256=0B5d_ovD56wcH9TfktRs88Q09R9f8Xx5h5ALWYvE8Iw,600
|
|
38
|
+
sycommon/middleware/docs.py,sha256=bVdDBIHXGVBv562MQLSroa1DgHoObxR9gFzv71PIejg,1187
|
|
39
|
+
sycommon/middleware/exception.py,sha256=UAy0tKijI_2JoKjwT3h62aL-tybftP3IETvcr26NOao,2883
|
|
40
|
+
sycommon/middleware/middleware.py,sha256=SzZ4wufSNdwC4Ppw99TE7a6AVGkrZRc55NHSrA3PiC8,1447
|
|
41
|
+
sycommon/middleware/monitor_memory.py,sha256=pYRK-wRuDd6enSg9Pf8tQxPdYQS6S0AyjyXeKFRLKEs,628
|
|
42
|
+
sycommon/middleware/mq.py,sha256=4wBqiT5wJGcrfjk2GSr0_U3TStBxoNpHTzcRxVlMEHE,183
|
|
43
|
+
sycommon/middleware/timeout.py,sha256=RLMzGMrzK14zsf8x-hmUW1DXWezETB0ZY8mpr9EKsos,740
|
|
44
|
+
sycommon/middleware/traceid.py,sha256=rJ6yLkYJi-x_Vq41xzkfAAc4xDts2IpPmDcKN8hYuv8,13065
|
|
45
|
+
sycommon/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
sycommon/models/base_http.py,sha256=EICAAibx3xhjBsLqm35Mi3DCqxp0FME4rD_3iQVjT_E,3051
|
|
47
|
+
sycommon/models/log.py,sha256=rZpj6VkDRxK3B6H7XSeWdYZshU8F0Sks8bq1p6pPlDw,500
|
|
48
|
+
sycommon/models/mqlistener_config.py,sha256=vXp2uMmd0XQ5B9noSRXWHewTy-juQ2y7IsWtISJD5aI,1661
|
|
49
|
+
sycommon/models/mqmsg_model.py,sha256=cxn0M5b0utQK6crMYmL-1waeGYHvK3AlGaRy23clqTE,277
|
|
50
|
+
sycommon/models/mqsend_config.py,sha256=NQX9dc8PpuquMG36GCVhJe8omAW1KVXXqr6lSRU6D7I,268
|
|
51
|
+
sycommon/models/sso_user.py,sha256=i1WAN6k5sPcPApQEdtjpWDy7VrzWLpOrOQewGLGoGIw,2702
|
|
52
|
+
sycommon/notice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
|
+
sycommon/notice/uvicorn_monitor.py,sha256=VryQYcAtjijJuGDBimbVurgwxlsLaLtkNnABPDY5Tao,7332
|
|
54
|
+
sycommon/rabbitmq/rabbitmq_client.py,sha256=hAbLOioU_clucJ9xq88Oo-waZOuU0ii4yBVGIjz1nBE,17992
|
|
55
|
+
sycommon/rabbitmq/rabbitmq_pool.py,sha256=BiFQgZPzSAFR-n5XhyIafoeWQXETF_31nFRDhMbe6aU,15577
|
|
56
|
+
sycommon/rabbitmq/rabbitmq_service.py,sha256=XSHo9HuIJ_lq-vizRh4xJVdZr_2zLqeLhot09qb0euA,2025
|
|
57
|
+
sycommon/rabbitmq/rabbitmq_service_client_manager.py,sha256=IP9TMFeG5LSrwFPEmOy1ce4baPxBUZnWJZR3nN_-XR4,8009
|
|
58
|
+
sycommon/rabbitmq/rabbitmq_service_connection_monitor.py,sha256=uvoMuJDzJ9i63uVRq1NKFV10CvkbGnTMyEoq2rgjQx8,3013
|
|
59
|
+
sycommon/rabbitmq/rabbitmq_service_consumer_manager.py,sha256=489r1RKd5WrTNMAcWCxUZpt9yWGrNunZlLCCp-M_rzM,11497
|
|
60
|
+
sycommon/rabbitmq/rabbitmq_service_core.py,sha256=6RMvIf78DmEOZmN8dA0duA9oy4ieNswdGrOeyJdD6tU,4753
|
|
61
|
+
sycommon/rabbitmq/rabbitmq_service_producer_manager.py,sha256=TJrLbvsjF55P9lwr7aCm9uRIRuC3z4EZNx74KEVKBtU,10190
|
|
62
|
+
sycommon/sentry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
|
+
sycommon/sentry/sy_sentry.py,sha256=e5Fbt9Gi2gIb048z0nuKbuhp3uCAEqYH2xXbF6qrZq4,1471
|
|
64
|
+
sycommon/sse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
|
+
sycommon/sse/event.py,sha256=k_rBJy23R7crtzQeetT0Q73D8o5-5p-eESGSs_BPOj0,2797
|
|
66
|
+
sycommon/sse/sse.py,sha256=__CfWEcYxOxQ-HpLor4LTZ5hLWqw9-2X7CngqbVHsfw,10128
|
|
67
|
+
sycommon/synacos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
+
sycommon/synacos/example.py,sha256=61XL03tU8WTNOo3FUduf93F2fAwah1S0lbH1ufhRhRk,5739
|
|
69
|
+
sycommon/synacos/example2.py,sha256=adUaru3Hy482KrOA17DfaC4nwvLj8etIDS_KrWLWmCU,4811
|
|
70
|
+
sycommon/synacos/feign.py,sha256=frB3D5LeFDtT3pJLFOwFzEOrNAJKeQNGk-BzUg9T3WM,8295
|
|
71
|
+
sycommon/synacos/feign_client.py,sha256=ExO7Pd5B3eFKDjXqBRc260K1jkI49IYguLwJJaD2R-o,16166
|
|
72
|
+
sycommon/synacos/nacos_client_base.py,sha256=l5jpall6nEt0Hy07Wk-PVU0VN0BmD_Mmtldmtyvvksg,4526
|
|
73
|
+
sycommon/synacos/nacos_config_manager.py,sha256=Cff-4gpp0aD7sQVi-nEvDO4BWqK9abEDDDJ9qXKFQgs,4399
|
|
74
|
+
sycommon/synacos/nacos_heartbeat_manager.py,sha256=G80_pOn37WdO_HpYUiAfpwMqAxW0ff0Bnw0NEuge9v0,5568
|
|
75
|
+
sycommon/synacos/nacos_service.py,sha256=BezQ1eDIYwBPE567Po_Qh1Ki_z9WmhZy1J1NiTPbdHY,6118
|
|
76
|
+
sycommon/synacos/nacos_service_discovery.py,sha256=O0M4facMa3I9YDFaovrfiTnCMtJWTuewbt9ce4a2-CA,6828
|
|
77
|
+
sycommon/synacos/nacos_service_registration.py,sha256=plg2PmH8CWgmVnPtiIXBxtj-3BpyMdSzKr1wyWRdzh4,10968
|
|
78
|
+
sycommon/synacos/param.py,sha256=KcfSkxnXOa0TGmCjY8hdzU9pzUsA8-4PeyBKWI2-568,1765
|
|
79
|
+
sycommon/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
+
sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
|
|
81
|
+
sycommon/tools/env.py,sha256=Ah-tBwG2C0_hwLGFebVQgKdWWXCjTzBuF23gCkLHYy4,2437
|
|
82
|
+
sycommon/tools/merge_headers.py,sha256=u9u8_1ZIuGIminWsw45YJ5qnsx9MB-Fot0VPge7itPw,4941
|
|
83
|
+
sycommon/tools/snowflake.py,sha256=xQlYXwYnI85kSJ1rZ89gMVBhzemP03xrMPVX9vVa3MY,9228
|
|
84
|
+
sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
|
|
85
|
+
sycommon_python_lib-0.1.57b1.dist-info/METADATA,sha256=SSwWUy9hRgJhiqL1ulY91dBhEegshkvsXXLTKxNnXTc,7301
|
|
86
|
+
sycommon_python_lib-0.1.57b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
87
|
+
sycommon_python_lib-0.1.57b1.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
|
|
88
|
+
sycommon_python_lib-0.1.57b1.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
|
|
89
|
+
sycommon_python_lib-0.1.57b1.dist-info/RECORD,,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
command/cli.py,sha256=bP2LCLkRvfETIwWkVD70q5xFxMI4D3BpH09Ws1f-ENc,5849
|
|
2
|
-
sycommon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
sycommon/services.py,sha256=LHMRxxRvLAiekkVspaQClBgAR_jLKqiJpd5hqF74MIE,11369
|
|
4
|
-
sycommon/config/Config.py,sha256=9yO5b8WfvEDvkyrGrlwrLFasgh_-MjcEvGF20Gz5Xo4,3041
|
|
5
|
-
sycommon/config/DatabaseConfig.py,sha256=ILiUuYT9_xJZE2W-RYuC3JCt_YLKc1sbH13-MHIOPhg,804
|
|
6
|
-
sycommon/config/EmbeddingConfig.py,sha256=gPKwiDYbeu1GpdIZXMmgqM7JqBIzCXi0yYuGRLZooMI,362
|
|
7
|
-
sycommon/config/LLMConfig.py,sha256=yU-aIqePIeF6msfRVEtGq7SXZVDfHyTi6JduKjhMO_4,371
|
|
8
|
-
sycommon/config/MQConfig.py,sha256=_RDcmIdyWKjmgM5ZnriOoI-DpaxgXs7CD0awdAD6z88,252
|
|
9
|
-
sycommon/config/RerankerConfig.py,sha256=dohekaY_eTynmMimIuKHBYGXXQO6rJjSkm94OPLuMik,322
|
|
10
|
-
sycommon/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
sycommon/database/base_db_service.py,sha256=J5ELHMNeGfzA6zVcASPSPZ0XNKrRY3_gdGmVkZw3Mto,946
|
|
12
|
-
sycommon/database/database_service.py,sha256=mun5vgM7nkuH6_UyHLHqQ2Qk_5gRgMxJu4_obIKLT6o,3253
|
|
13
|
-
sycommon/health/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
sycommon/health/health_check.py,sha256=EhfbhspRpQiKJaxdtE-PzpKQO_ucaFKtQxIm16F5Mpk,391
|
|
15
|
-
sycommon/health/metrics.py,sha256=fHqO73JuhoZkNPR-xIlxieXiTCvttq-kG-tvxag1s1s,268
|
|
16
|
-
sycommon/health/ping.py,sha256=FTlnIKk5y1mPfS1ZGOeT5IM_2udF5aqVLubEtuBp18M,250
|
|
17
|
-
sycommon/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
sycommon/logging/kafka_log.py,sha256=qHq4sU42aGrTm9DWYKxGDp1pe9ENfYSbzI4iPDPNvJQ,21128
|
|
19
|
-
sycommon/logging/logger_wrapper.py,sha256=TiHsrIIHiQMzXgXK12-0KIpU9GhwQJOoHslakzmq2zc,357
|
|
20
|
-
sycommon/logging/sql_logger.py,sha256=aEU3OGnI_51Tjyuuf4FpUi9KPTceFRuKAOyQbPzGhzM,2021
|
|
21
|
-
sycommon/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
sycommon/middleware/context.py,sha256=_5ghpv4u_yAvjkgM-XDx8OnO-YI1XtntHrXsHJHZkwo,88
|
|
23
|
-
sycommon/middleware/cors.py,sha256=0B5d_ovD56wcH9TfktRs88Q09R9f8Xx5h5ALWYvE8Iw,600
|
|
24
|
-
sycommon/middleware/docs.py,sha256=bVdDBIHXGVBv562MQLSroa1DgHoObxR9gFzv71PIejg,1187
|
|
25
|
-
sycommon/middleware/exception.py,sha256=Bk8IchNND1wg6tUX9hf4xWeEJhvA-E_zE9ysBpRZrqE,3010
|
|
26
|
-
sycommon/middleware/middleware.py,sha256=SzZ4wufSNdwC4Ppw99TE7a6AVGkrZRc55NHSrA3PiC8,1447
|
|
27
|
-
sycommon/middleware/monitor_memory.py,sha256=pYRK-wRuDd6enSg9Pf8tQxPdYQS6S0AyjyXeKFRLKEs,628
|
|
28
|
-
sycommon/middleware/mq.py,sha256=4wBqiT5wJGcrfjk2GSr0_U3TStBxoNpHTzcRxVlMEHE,183
|
|
29
|
-
sycommon/middleware/timeout.py,sha256=fImlAPLm4Oa8N9goXtT_0os1GZPCi9F92OgXU81DgDU,656
|
|
30
|
-
sycommon/middleware/traceid.py,sha256=ugqPgHdUydj7m481rM_RH-yrIK9hAdkLemdPSSOnQvw,6821
|
|
31
|
-
sycommon/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
-
sycommon/models/base_http.py,sha256=EICAAibx3xhjBsLqm35Mi3DCqxp0FME4rD_3iQVjT_E,3051
|
|
33
|
-
sycommon/models/log.py,sha256=rZpj6VkDRxK3B6H7XSeWdYZshU8F0Sks8bq1p6pPlDw,500
|
|
34
|
-
sycommon/models/mqlistener_config.py,sha256=vXp2uMmd0XQ5B9noSRXWHewTy-juQ2y7IsWtISJD5aI,1661
|
|
35
|
-
sycommon/models/mqmsg_model.py,sha256=cxn0M5b0utQK6crMYmL-1waeGYHvK3AlGaRy23clqTE,277
|
|
36
|
-
sycommon/models/mqsend_config.py,sha256=NQX9dc8PpuquMG36GCVhJe8omAW1KVXXqr6lSRU6D7I,268
|
|
37
|
-
sycommon/models/sso_user.py,sha256=i1WAN6k5sPcPApQEdtjpWDy7VrzWLpOrOQewGLGoGIw,2702
|
|
38
|
-
sycommon/rabbitmq/rabbitmq_client.py,sha256=dKpiptV892VbW3fErAoRZSE9UVVBZvbVPM3qPu8rQIk,21573
|
|
39
|
-
sycommon/rabbitmq/rabbitmq_pool.py,sha256=VLJ6JIIoVf1_NKV7FNmDFVkX5klN2JtLzbuUaaroEdc,27096
|
|
40
|
-
sycommon/rabbitmq/rabbitmq_service.py,sha256=UUvGkmDBQ7xTdCLYqkDSYZw5-FUNU7vnmgmANh4Z_bI,39960
|
|
41
|
-
sycommon/sse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
-
sycommon/sse/event.py,sha256=k_rBJy23R7crtzQeetT0Q73D8o5-5p-eESGSs_BPOj0,2797
|
|
43
|
-
sycommon/sse/sse.py,sha256=__CfWEcYxOxQ-HpLor4LTZ5hLWqw9-2X7CngqbVHsfw,10128
|
|
44
|
-
sycommon/synacos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
-
sycommon/synacos/example.py,sha256=61XL03tU8WTNOo3FUduf93F2fAwah1S0lbH1ufhRhRk,5739
|
|
46
|
-
sycommon/synacos/example2.py,sha256=adUaru3Hy482KrOA17DfaC4nwvLj8etIDS_KrWLWmCU,4811
|
|
47
|
-
sycommon/synacos/feign.py,sha256=-2tuGCqoSM3ddSoSz7h1RJTB06hn8K26v_1ev4qLsTU,7728
|
|
48
|
-
sycommon/synacos/feign_client.py,sha256=JxzxohrsscQNlAjRVo_3ZQrMQSfVHFOtRYyEnP6sDGk,15205
|
|
49
|
-
sycommon/synacos/nacos_service.py,sha256=2m1ZxIii3r657kQJfp7C7I5bxBUEGDweYMfloUUmBSw,35389
|
|
50
|
-
sycommon/synacos/param.py,sha256=KcfSkxnXOa0TGmCjY8hdzU9pzUsA8-4PeyBKWI2-568,1765
|
|
51
|
-
sycommon/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
-
sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
|
|
53
|
-
sycommon/tools/snowflake.py,sha256=DdEj3T5r5OEvikp3puxqmmmz6BrggxomoSlnsRFb5dM,1174
|
|
54
|
-
sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
|
|
55
|
-
sycommon_python_lib-0.1.46.dist-info/METADATA,sha256=TAAHgjLYJMlud71VM9Q_Fe98-3cNO9Gj2-mgUXmUWPI,7037
|
|
56
|
-
sycommon_python_lib-0.1.46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
57
|
-
sycommon_python_lib-0.1.46.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
|
|
58
|
-
sycommon_python_lib-0.1.46.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
|
|
59
|
-
sycommon_python_lib-0.1.46.dist-info/RECORD,,
|
|
File without changes
|
{sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sycommon_python_lib-0.1.46.dist-info → sycommon_python_lib-0.1.57b1.dist-info}/top_level.txt
RENAMED
|
File without changes
|