sycommon-python-lib 0.1.16__py3-none-any.whl → 0.1.56b1__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.
Files changed (36) hide show
  1. sycommon/config/Config.py +6 -2
  2. sycommon/config/RerankerConfig.py +1 -0
  3. sycommon/database/async_base_db_service.py +36 -0
  4. sycommon/database/async_database_service.py +96 -0
  5. sycommon/database/database_service.py +6 -1
  6. sycommon/health/metrics.py +13 -0
  7. sycommon/llm/__init__.py +0 -0
  8. sycommon/llm/embedding.py +149 -0
  9. sycommon/llm/get_llm.py +177 -0
  10. sycommon/llm/llm_logger.py +126 -0
  11. sycommon/logging/async_sql_logger.py +65 -0
  12. sycommon/logging/kafka_log.py +36 -14
  13. sycommon/logging/logger_levels.py +23 -0
  14. sycommon/logging/sql_logger.py +53 -0
  15. sycommon/middleware/context.py +2 -0
  16. sycommon/middleware/middleware.py +4 -0
  17. sycommon/middleware/traceid.py +155 -32
  18. sycommon/models/mqlistener_config.py +1 -0
  19. sycommon/rabbitmq/rabbitmq_client.py +377 -821
  20. sycommon/rabbitmq/rabbitmq_pool.py +338 -0
  21. sycommon/rabbitmq/rabbitmq_service.py +411 -229
  22. sycommon/services.py +116 -61
  23. sycommon/synacos/example.py +153 -0
  24. sycommon/synacos/example2.py +129 -0
  25. sycommon/synacos/feign.py +90 -413
  26. sycommon/synacos/feign_client.py +335 -0
  27. sycommon/synacos/nacos_service.py +159 -106
  28. sycommon/synacos/param.py +75 -0
  29. sycommon/tools/merge_headers.py +97 -0
  30. sycommon/tools/snowflake.py +296 -7
  31. {sycommon_python_lib-0.1.16.dist-info → sycommon_python_lib-0.1.56b1.dist-info}/METADATA +19 -13
  32. sycommon_python_lib-0.1.56b1.dist-info/RECORD +68 -0
  33. sycommon_python_lib-0.1.16.dist-info/RECORD +0 -52
  34. {sycommon_python_lib-0.1.16.dist-info → sycommon_python_lib-0.1.56b1.dist-info}/WHEEL +0 -0
  35. {sycommon_python_lib-0.1.16.dist-info → sycommon_python_lib-0.1.56b1.dist-info}/entry_points.txt +0 -0
  36. {sycommon_python_lib-0.1.16.dist-info → sycommon_python_lib-0.1.56b1.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,300 @@
1
- import uuid
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
+ 自定义类属性描述符,替代 @classmethod + @property 的废弃写法
15
+ 支持通过 类.属性 的方式访问,无需实例化
16
+ """
17
+
18
+ def __init__(self, func):
19
+ self.func = func
20
+
21
+ def __get__(self, instance: Any, cls: Type) -> str:
22
+ # 调用传入的函数,并传入类本身作为第一个参数
23
+ return self.func(cls)
2
24
 
3
25
 
4
26
  class Snowflake:
27
+ """雪花算法生成器(生产级优化版,无公网依赖,适配内网/K8s环境)"""
28
+ # 基础配置(可根据业务调整)
29
+ START_TIMESTAMP = 1388534400000 # 2014-01-01 00:00:00
30
+ SEQUENCE_BITS = 12
31
+ MACHINE_ID_BITS = 10
32
+ MAX_MACHINE_ID = (1 << MACHINE_ID_BITS) - 1 # 0~1023
33
+ MAX_SEQUENCE = (1 << SEQUENCE_BITS) - 1
34
+ MACHINE_ID_SHIFT = SEQUENCE_BITS
35
+ TIMESTAMP_SHIFT = SEQUENCE_BITS + MACHINE_ID_BITS
36
+ CLOCK_BACKWARD_THRESHOLD = 5 # 容忍的时钟回拨阈值(毫秒)
37
+ _MAX_JAVA_LONG = 9223372036854775807 # Java Long最大值
38
+
39
+ # 类级别的单例实例(线程安全)
40
+ _instance = None
41
+ _instance_lock = threading.Lock()
42
+
43
+ def __init__(self, machine_id: Optional[int] = None):
44
+ """
45
+ 初始化:优先使用传入的machine_id,否则自动从K8s环境获取
46
+ :param machine_id: 手动指定机器ID(None则自动计算)
47
+ """
48
+ # 前置校验:确保雪花ID不会超过Java Long最大值
49
+ self._validate_timestamp_range()
50
+
51
+ # 自动计算K8s环境下的machine_id
52
+ if machine_id is None:
53
+ machine_id = self._get_k8s_machine_id()
54
+
55
+ # 校验machine_id合法性
56
+ if not (0 <= machine_id <= self.MAX_MACHINE_ID):
57
+ raise ValueError(f"机器ID必须在0~{self.MAX_MACHINE_ID}之间")
58
+
59
+ # 初始化核心参数
60
+ self.machine_id = machine_id
61
+ self.last_timestamp = -1
62
+ self.sequence = 0
63
+ self.lock = threading.Lock()
64
+
65
+ def _validate_timestamp_range(self):
66
+ """校验当前时间戳是否在雪花ID支持的范围内,避免超过Java Long最大值"""
67
+ max_support_timestamp = self.START_TIMESTAMP + \
68
+ (1 << (64 - self.TIMESTAMP_SHIFT)) - 1
69
+ current_timestamp = self._get_current_timestamp()
70
+ if current_timestamp > max_support_timestamp:
71
+ raise RuntimeError(
72
+ f"当前时间戳({current_timestamp})超过雪花ID支持的最大时间戳({max_support_timestamp}),"
73
+ f"请调整START_TIMESTAMP或减少TIMESTAMP_SHIFT位数"
74
+ )
75
+
76
+ def _get_k8s_machine_id(self) -> int:
77
+ """
78
+ 从K8s环境自动计算唯一machine_id(无公网依赖,多层兜底,降低重复风险):
79
+ 优先级:POD_NAME > POD_IP > 容器内网IP(psutil读取) > 容器主机名 > 进程+时间+随机数(最终兜底)
80
+ """
81
+ # 1. 优先读取K8s内置的POD_NAME(默认注入,优先级最高)
82
+ pod_name = environ.get("POD_NAME")
83
+ if pod_name:
84
+ return self._hash_to_machine_id(pod_name)
85
+
86
+ # 2. 读取POD_IP(手动配置downwardAPI后必存在)
87
+ pod_ip = environ.get("POD_IP")
88
+ if pod_ip:
89
+ return self._hash_to_machine_id(pod_ip)
90
+
91
+ # 3. 兜底1:读取本机网卡获取内网IP(替换netifaces,使用psutil)
92
+ try:
93
+ local_ip = self._get_local_internal_ip()
94
+ if local_ip:
95
+ return self._hash_to_machine_id(local_ip)
96
+ except Exception:
97
+ pass
98
+
99
+ # 4. 兜底2:获取容器主机名(K8s中默认等于Pod名称,保证唯一)
100
+ hostname = socket.gethostname()
101
+ if hostname:
102
+ return self._hash_to_machine_id(hostname)
103
+
104
+ # 5. 最终兜底:增加熵值(进程ID+毫秒时间戳+随机数),大幅降低重复概率
105
+ fallback_text = f"{os.getpid()}_{int(time.time()*1000)}_{random.randint(0, 100000)}"
106
+ return self._hash_to_machine_id(fallback_text)
107
+
108
+ def _get_local_internal_ip(self) -> Optional[str]:
109
+ """
110
+ 使用psutil读取本机网卡信息,获取非回环的内网IP(跨平台兼容,过滤lo/lo0等回环网卡)
111
+ :return: 内网IP字符串,失败返回None
112
+ """
113
+ try:
114
+ # 遍历所有网卡接口
115
+ net_if_addrs = psutil.net_if_addrs()
116
+ for interface_name, addrs in net_if_addrs.items():
117
+ # 过滤回环/虚拟网卡(兼容lo、lo0、lo1、Loopback、virtual等)
118
+ if (interface_name.lower().startswith("lo")
119
+ or interface_name.lower() in ["loopback", "virtual"]):
120
+ continue
121
+ # 遍历该网卡的所有地址,优先返回第一个非回环IPv4
122
+ for addr in addrs:
123
+ if addr.family == psutil.AF_INET:
124
+ ip = addr.address
125
+ if ip and not ip.startswith('127.'):
126
+ return ip
127
+ return None
128
+ except Exception:
129
+ # psutil调用失败,降级到纯内置方法
130
+ return self._get_local_ip_fallback()
131
+
132
+ def _get_local_ip_fallback(self) -> Optional[str]:
133
+ """
134
+ 增强版降级方案:纯Python内置方法,多维度获取内网IP(无第三方依赖)
135
+ """
136
+ # 方案1:socket绑定内网地址(避免访问公网)
137
+ try:
138
+ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
139
+ s.connect(("192.168.0.1", 80))
140
+ local_ip = s.getsockname()[0]
141
+ s.close()
142
+ if not local_ip.startswith('127.'):
143
+ return local_ip
144
+ except Exception:
145
+ pass
146
+
147
+ # 方案2:遍历所有本地IP(通过hostname解析)
148
+ try:
149
+ hostname = socket.gethostname()
150
+ ip_list = socket.gethostbyname_ex(hostname)[2]
151
+ for ip in ip_list:
152
+ if not ip.startswith('127.'):
153
+ return ip
154
+ except Exception:
155
+ pass
156
+
157
+ return None
158
+
159
+ def _hash_to_machine_id(self, text: str) -> int:
160
+ """将字符串哈希后取模,得到0~1023的machine_id(保证分布均匀)"""
161
+ hash_bytes = hashlib.md5(text.encode("utf-8")).digest()
162
+ hash_int = int.from_bytes(hash_bytes[:4], byteorder="big")
163
+ return hash_int % self.MAX_MACHINE_ID
164
+
165
+ def _get_current_timestamp(self) -> int:
166
+ """获取当前毫秒级时间戳"""
167
+ return int(time.time() * 1000)
168
+
169
+ def _wait_next_millisecond(self, current_timestamp: int) -> int:
170
+ """等待直到下一个毫秒,避免序列耗尽"""
171
+ while current_timestamp <= self.last_timestamp:
172
+ current_timestamp = self._get_current_timestamp()
173
+ return current_timestamp
174
+
175
+ def generate_id(self) -> int:
176
+ """生成雪花ID(生产级优化:优化锁粒度,容忍轻微时钟回拨)"""
177
+ current_timestamp = self._get_current_timestamp()
178
+
179
+ # 1. 处理时钟回拨:容忍CLOCK_BACKWARD_THRESHOLD内的微调,超过则抛异常
180
+ time_diff = self.last_timestamp - current_timestamp
181
+ if time_diff > 0:
182
+ if time_diff > self.CLOCK_BACKWARD_THRESHOLD:
183
+ raise RuntimeError(
184
+ f"时钟回拨检测:当前时间戳({current_timestamp}) < 上一次时间戳({self.last_timestamp}),"
185
+ f"差值{time_diff}ms(阈值{self.CLOCK_BACKWARD_THRESHOLD}ms)"
186
+ )
187
+ # 轻微回拨:等待时钟追上
188
+ current_timestamp = self._wait_next_millisecond(current_timestamp)
189
+
190
+ # 2. 优化锁粒度:仅在同一毫秒内递增序列时加锁
191
+ if current_timestamp != self.last_timestamp:
192
+ with self.lock:
193
+ self.last_timestamp = current_timestamp
194
+ self.sequence = 0
195
+ else:
196
+ with self.lock:
197
+ self.sequence = (self.sequence + 1) & self.MAX_SEQUENCE
198
+ if self.sequence == 0:
199
+ current_timestamp = self._wait_next_millisecond(
200
+ current_timestamp)
201
+ self.last_timestamp = current_timestamp
202
+
203
+ # 3. 计算最终雪花ID
204
+ snowflake_id = (
205
+ ((current_timestamp - self.START_TIMESTAMP) << self.TIMESTAMP_SHIFT)
206
+ | (self.machine_id << self.MACHINE_ID_SHIFT)
207
+ | self.sequence
208
+ )
209
+
210
+ # 最终校验:确保不超过Java Long最大值
211
+ if snowflake_id > self._MAX_JAVA_LONG:
212
+ raise RuntimeError(
213
+ f"生成的雪花ID({snowflake_id})超过Java Long最大值({self._MAX_JAVA_LONG})")
214
+
215
+ return snowflake_id
216
+
5
217
  @staticmethod
6
- def next_id():
7
- hex = uuid.uuid4().hex
8
- uuid_int = int(hex, 16)
9
- uuid_str = str(uuid_int).zfill(32)
10
- id_str = uuid_str[:19]
11
- return str(int(id_str))
218
+ def parse_id(snowflake_id: int) -> dict:
219
+ """解析雪花ID,返回生成时间、机器ID、序列等信息"""
220
+ from datetime import datetime
221
+ sequence = snowflake_id & Snowflake.MAX_SEQUENCE
222
+ machine_id = (snowflake_id >>
223
+ Snowflake.MACHINE_ID_SHIFT) & Snowflake.MAX_MACHINE_ID
224
+ timestamp = (snowflake_id >> Snowflake.TIMESTAMP_SHIFT) + \
225
+ Snowflake.START_TIMESTAMP
226
+ generate_time = datetime.fromtimestamp(
227
+ timestamp / 1000).strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
228
+
229
+ return {
230
+ "snowflake_id": snowflake_id,
231
+ "generate_time": generate_time,
232
+ "machine_id": machine_id,
233
+ "sequence": sequence,
234
+ "is_java_long_safe": snowflake_id <= Snowflake._MAX_JAVA_LONG
235
+ }
236
+
237
+ @classmethod
238
+ def next_id(cls) -> str:
239
+ """
240
+ 生成雪花ID(线程安全单例模式,避免重复创建实例,锁内完成所有初始化)
241
+ :return: 雪花ID字符串
242
+ """
243
+ if cls._instance is None:
244
+ with cls._instance_lock:
245
+ if cls._instance is None:
246
+ # 锁内初始化,避免多线程重复计算machine_id
247
+ cls._instance = cls()
248
+ return str(cls._instance.generate_id())
249
+
250
+ @ClassProperty
251
+ def id(cls) -> str:
252
+ """
253
+ 直接通过 `Snowflake.id` 属性生成雪花ID(兼容Python 3.11+)
254
+ :return: 雪花ID字符串
255
+ """
256
+ return cls.next_id()
257
+
258
+
259
+ if __name__ == "__main__":
260
+ print("=== 生产级雪花算法ID生成测试 ===")
261
+ # 1. 基础生成测试
262
+ id1 = Snowflake.id
263
+ id2 = Snowflake.id
264
+ id3 = Snowflake.id
265
+ print(f"生成ID1: {id1}")
266
+ print(f"生成ID2: {id2}")
267
+ print(f"生成ID3: {id3}")
268
+ print(f"ID是否唯一: {len({id1, id2, id3}) == 3}")
269
+
270
+ # 2. 解析ID信息
271
+ print("\n=== 雪花ID解析 ===")
272
+ parse_info = Snowflake.parse_id(int(id3))
273
+ for key, value in parse_info.items():
274
+ print(f"{key}: {value}")
275
+
276
+ # 3. 批量唯一性验证(10000个ID)
277
+ print("\n=== 批量唯一性验证(10000个)===")
278
+ id_set = set()
279
+ duplicate_count = 0
280
+ for i in range(10000):
281
+ snow_id = Snowflake.id
282
+ if snow_id in id_set:
283
+ duplicate_count += 1
284
+ id_set.add(snow_id)
285
+ print(f"总生成数量: 10000")
286
+ print(f"唯一ID数量: {len(id_set)}")
287
+ print(f"重复ID数量: {duplicate_count}")
288
+ print(f"机器ID: {Snowflake._instance.machine_id}")
289
+
290
+ # 4. 高并发测试
291
+ import concurrent.futures
292
+ print("\n=== 高并发测试(100线程)===")
293
+ id_set_concurrent = set()
294
+ with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
295
+ futures = [executor.submit(lambda: Snowflake.id) for _ in range(10000)]
296
+ for future in concurrent.futures.as_completed(futures):
297
+ id_set_concurrent.add(future.result())
298
+ print(f"高并发生成唯一ID数量: {len(id_set_concurrent)}")
299
+
300
+ print("\n=== 生产级雪花算法验证通过 ===")
@@ -1,23 +1,29 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sycommon-python-lib
3
- Version: 0.1.16
3
+ Version: 0.1.56b1
4
4
  Summary: Add your description here
5
- Requires-Python: >=3.10
5
+ Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
7
- Requires-Dist: aio-pika>=9.5.7
8
- Requires-Dist: aiohttp>=3.12.15
7
+ Requires-Dist: aio-pika>=9.5.8
8
+ Requires-Dist: aiohttp>=3.13.2
9
+ Requires-Dist: aiomysql>=0.3.2
9
10
  Requires-Dist: decorator>=5.2.1
10
- Requires-Dist: fastapi>=0.117.1
11
- Requires-Dist: kafka-python>=2.2.15
11
+ Requires-Dist: fastapi>=0.127.0
12
+ Requires-Dist: kafka-python>=2.3.0
13
+ Requires-Dist: langchain>=1.2.0
14
+ Requires-Dist: langchain-core>=1.2.6
15
+ Requires-Dist: langchain-openai>=1.1.6
16
+ Requires-Dist: langgraph>=1.0.5
12
17
  Requires-Dist: loguru>=0.7.3
13
- Requires-Dist: mysql-connector-python>=9.4.0
14
- Requires-Dist: nacos-sdk-python>=2.0.9
15
- Requires-Dist: pydantic>=2.11.9
16
- Requires-Dist: python-dotenv>=1.1.1
18
+ Requires-Dist: mysql-connector-python>=9.5.0
19
+ Requires-Dist: nacos-sdk-python<3.0,>=2.0.9
20
+ Requires-Dist: psutil>=7.1.3
21
+ Requires-Dist: pydantic>=2.12.5
22
+ Requires-Dist: python-dotenv>=1.2.1
17
23
  Requires-Dist: pyyaml>=6.0.3
18
- Requires-Dist: sqlalchemy>=2.0.43
19
- Requires-Dist: uuid>=1.30
20
- Requires-Dist: uvicorn>=0.37.0
24
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.45
25
+ Requires-Dist: starlette>=0.50.0
26
+ Requires-Dist: uvicorn>=0.40.0
21
27
 
22
28
  # sycommon-python-lib
23
29
 
@@ -0,0 +1,68 @@
1
+ command/cli.py,sha256=bP2LCLkRvfETIwWkVD70q5xFxMI4D3BpH09Ws1f-ENc,5849
2
+ sycommon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ sycommon/services.py,sha256=pioA4E2RrV6nyAY8EuETUt4mKzCYoxD1rTMYCcppqjE,11581
4
+ sycommon/config/Config.py,sha256=XWXcE_6RaoB9og0Q6ylQs4oW-lX9mhblr-wWq7S2dVY,3157
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=35sVwzus2IscvTHnCG63Orl2pC-pMsrVi6wAGDmOH3U,341
10
+ sycommon/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ sycommon/database/async_base_db_service.py,sha256=w6ONUiTtF4-bXRnkBt9QpL9BAy0XUDbQG7F9Hf2rfjw,1337
12
+ sycommon/database/async_database_service.py,sha256=4Ag5PH6DFEcJOXR8MRF9V_Jho5uCoU9Ibo3PqulDsXw,3916
13
+ sycommon/database/base_db_service.py,sha256=J5ELHMNeGfzA6zVcASPSPZ0XNKrRY3_gdGmVkZw3Mto,946
14
+ sycommon/database/database_service.py,sha256=mun5vgM7nkuH6_UyHLHqQ2Qk_5gRgMxJu4_obIKLT6o,3253
15
+ sycommon/health/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ sycommon/health/health_check.py,sha256=EhfbhspRpQiKJaxdtE-PzpKQO_ucaFKtQxIm16F5Mpk,391
17
+ sycommon/health/metrics.py,sha256=fHqO73JuhoZkNPR-xIlxieXiTCvttq-kG-tvxag1s1s,268
18
+ sycommon/health/ping.py,sha256=FTlnIKk5y1mPfS1ZGOeT5IM_2udF5aqVLubEtuBp18M,250
19
+ sycommon/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ sycommon/llm/embedding.py,sha256=Wcm2W7JU3FyZXvOhMSdyhiZJhJS1MwW8bMqdrOzD2TY,5768
21
+ sycommon/llm/get_llm.py,sha256=QnmNwah2wzO2P1o37lNTrpzg7ZYvaDHjIzgOD9n3Ais,8325
22
+ sycommon/llm/llm_logger.py,sha256=n4UeNy_-g4oHQOsw-VUzF4uo3JVRLtxaMp1FcI8FiEo,5437
23
+ sycommon/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ sycommon/logging/async_sql_logger.py,sha256=_OY36XkUm__U3NhMgiecy-qd-nptZ_0gpE3J8lGAr58,2619
25
+ sycommon/logging/kafka_log.py,sha256=sVw-dFZKEgCosjSUqgTj7YrpK-ggXhleZFwMUVhl-K0,21416
26
+ sycommon/logging/logger_levels.py,sha256=_-uQ_T1N8NkNgcAmLrMmJ83nHTDw5ZNvXFPvdk89XGY,1144
27
+ sycommon/logging/logger_wrapper.py,sha256=TiHsrIIHiQMzXgXK12-0KIpU9GhwQJOoHslakzmq2zc,357
28
+ sycommon/logging/sql_logger.py,sha256=aEU3OGnI_51Tjyuuf4FpUi9KPTceFRuKAOyQbPzGhzM,2021
29
+ sycommon/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ sycommon/middleware/context.py,sha256=sc1UjN55dYww2tT9KdFMJV8mgpGro67SnETzbVzty-s,155
31
+ sycommon/middleware/cors.py,sha256=0B5d_ovD56wcH9TfktRs88Q09R9f8Xx5h5ALWYvE8Iw,600
32
+ sycommon/middleware/docs.py,sha256=bVdDBIHXGVBv562MQLSroa1DgHoObxR9gFzv71PIejg,1187
33
+ sycommon/middleware/exception.py,sha256=Bk8IchNND1wg6tUX9hf4xWeEJhvA-E_zE9ysBpRZrqE,3010
34
+ sycommon/middleware/middleware.py,sha256=SzZ4wufSNdwC4Ppw99TE7a6AVGkrZRc55NHSrA3PiC8,1447
35
+ sycommon/middleware/monitor_memory.py,sha256=pYRK-wRuDd6enSg9Pf8tQxPdYQS6S0AyjyXeKFRLKEs,628
36
+ sycommon/middleware/mq.py,sha256=4wBqiT5wJGcrfjk2GSr0_U3TStBxoNpHTzcRxVlMEHE,183
37
+ sycommon/middleware/timeout.py,sha256=fImlAPLm4Oa8N9goXtT_0os1GZPCi9F92OgXU81DgDU,656
38
+ sycommon/middleware/traceid.py,sha256=0WYLV5PR6sGeqhLdviHYW94UhUC7NJua2g5HWf2Zhbc,13447
39
+ sycommon/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ sycommon/models/base_http.py,sha256=EICAAibx3xhjBsLqm35Mi3DCqxp0FME4rD_3iQVjT_E,3051
41
+ sycommon/models/log.py,sha256=rZpj6VkDRxK3B6H7XSeWdYZshU8F0Sks8bq1p6pPlDw,500
42
+ sycommon/models/mqlistener_config.py,sha256=vXp2uMmd0XQ5B9noSRXWHewTy-juQ2y7IsWtISJD5aI,1661
43
+ sycommon/models/mqmsg_model.py,sha256=cxn0M5b0utQK6crMYmL-1waeGYHvK3AlGaRy23clqTE,277
44
+ sycommon/models/mqsend_config.py,sha256=NQX9dc8PpuquMG36GCVhJe8omAW1KVXXqr6lSRU6D7I,268
45
+ sycommon/models/sso_user.py,sha256=i1WAN6k5sPcPApQEdtjpWDy7VrzWLpOrOQewGLGoGIw,2702
46
+ sycommon/rabbitmq/rabbitmq_client.py,sha256=GkuYILMZJnvgZs4ID46I-w_UGzzI28YUydKgkTIDhIs,20226
47
+ sycommon/rabbitmq/rabbitmq_pool.py,sha256=QtUcK4HuepRqRmy5XkUQo8gDgj74fr77CX7T5rN0y4I,15640
48
+ sycommon/rabbitmq/rabbitmq_service.py,sha256=wpEJynP0gzbnmMyB02sfR9nTWB4hfTTP00xQxDJu644,38119
49
+ sycommon/sse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ sycommon/sse/event.py,sha256=k_rBJy23R7crtzQeetT0Q73D8o5-5p-eESGSs_BPOj0,2797
51
+ sycommon/sse/sse.py,sha256=__CfWEcYxOxQ-HpLor4LTZ5hLWqw9-2X7CngqbVHsfw,10128
52
+ sycommon/synacos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
+ sycommon/synacos/example.py,sha256=61XL03tU8WTNOo3FUduf93F2fAwah1S0lbH1ufhRhRk,5739
54
+ sycommon/synacos/example2.py,sha256=adUaru3Hy482KrOA17DfaC4nwvLj8etIDS_KrWLWmCU,4811
55
+ sycommon/synacos/feign.py,sha256=frB3D5LeFDtT3pJLFOwFzEOrNAJKeQNGk-BzUg9T3WM,8295
56
+ sycommon/synacos/feign_client.py,sha256=ExO7Pd5B3eFKDjXqBRc260K1jkI49IYguLwJJaD2R-o,16166
57
+ sycommon/synacos/nacos_service.py,sha256=cvmjd9dJIzaOFm6IXGjy2BCq1gHTHRxLYdgt5kBguUw,35976
58
+ sycommon/synacos/param.py,sha256=KcfSkxnXOa0TGmCjY8hdzU9pzUsA8-4PeyBKWI2-568,1765
59
+ sycommon/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
+ sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
61
+ sycommon/tools/merge_headers.py,sha256=HV_i52Q-9se3SP8qh7ZGYl8bP7Fxtal4CGVkyMwEdM8,4373
62
+ sycommon/tools/snowflake.py,sha256=lVEe5mNCOgz5OqGQpf5_nXaGnRJlI2STX2s-ppTtanA,11947
63
+ sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
64
+ sycommon_python_lib-0.1.56b1.dist-info/METADATA,sha256=aA68KfjXEI5w_opgTulofxt2fA8NEEp1GNl7JLqq2sQ,7226
65
+ sycommon_python_lib-0.1.56b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
66
+ sycommon_python_lib-0.1.56b1.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
67
+ sycommon_python_lib-0.1.56b1.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
68
+ sycommon_python_lib-0.1.56b1.dist-info/RECORD,,
@@ -1,52 +0,0 @@
1
- command/cli.py,sha256=bP2LCLkRvfETIwWkVD70q5xFxMI4D3BpH09Ws1f-ENc,5849
2
- sycommon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- sycommon/services.py,sha256=jQBzJvepaUyDVxLOC39OJokgQfwME0eRj9uN-13ZPjg,8423
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=B9tCaMsKGK87XF20YQh-eGupa3dq0JXymKnAAJvS2DQ,3060
13
- sycommon/health/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- sycommon/health/health_check.py,sha256=EhfbhspRpQiKJaxdtE-PzpKQO_ucaFKtQxIm16F5Mpk,391
15
- sycommon/health/ping.py,sha256=FTlnIKk5y1mPfS1ZGOeT5IM_2udF5aqVLubEtuBp18M,250
16
- sycommon/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- sycommon/logging/kafka_log.py,sha256=g6X46GlqJMzMMZEhbNa-eTswzkF8ILBHDYQFbjz6j54,20757
18
- sycommon/logging/logger_wrapper.py,sha256=TiHsrIIHiQMzXgXK12-0KIpU9GhwQJOoHslakzmq2zc,357
19
- sycommon/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- sycommon/middleware/context.py,sha256=_5ghpv4u_yAvjkgM-XDx8OnO-YI1XtntHrXsHJHZkwo,88
21
- sycommon/middleware/cors.py,sha256=0B5d_ovD56wcH9TfktRs88Q09R9f8Xx5h5ALWYvE8Iw,600
22
- sycommon/middleware/docs.py,sha256=bVdDBIHXGVBv562MQLSroa1DgHoObxR9gFzv71PIejg,1187
23
- sycommon/middleware/exception.py,sha256=Bk8IchNND1wg6tUX9hf4xWeEJhvA-E_zE9ysBpRZrqE,3010
24
- sycommon/middleware/middleware.py,sha256=5jXhCatm3nS6BpRtGBNOHu59feTwikLGC2caF9AyfpY,1329
25
- sycommon/middleware/monitor_memory.py,sha256=pYRK-wRuDd6enSg9Pf8tQxPdYQS6S0AyjyXeKFRLKEs,628
26
- sycommon/middleware/mq.py,sha256=4wBqiT5wJGcrfjk2GSr0_U3TStBxoNpHTzcRxVlMEHE,183
27
- sycommon/middleware/timeout.py,sha256=fImlAPLm4Oa8N9goXtT_0os1GZPCi9F92OgXU81DgDU,656
28
- sycommon/middleware/traceid.py,sha256=oGTJ2jtdea_3NgaAwXLpUug5dGUYRQeM4r1n2icuvC8,6839
29
- sycommon/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- sycommon/models/base_http.py,sha256=EICAAibx3xhjBsLqm35Mi3DCqxp0FME4rD_3iQVjT_E,3051
31
- sycommon/models/log.py,sha256=rZpj6VkDRxK3B6H7XSeWdYZshU8F0Sks8bq1p6pPlDw,500
32
- sycommon/models/mqlistener_config.py,sha256=PPwhAVJ2AWvVAvNox_1t0fuBKTyRH3Ui9cuuU-q7Byo,1590
33
- sycommon/models/mqmsg_model.py,sha256=cxn0M5b0utQK6crMYmL-1waeGYHvK3AlGaRy23clqTE,277
34
- sycommon/models/mqsend_config.py,sha256=NQX9dc8PpuquMG36GCVhJe8omAW1KVXXqr6lSRU6D7I,268
35
- sycommon/models/sso_user.py,sha256=i1WAN6k5sPcPApQEdtjpWDy7VrzWLpOrOQewGLGoGIw,2702
36
- sycommon/rabbitmq/rabbitmq_client.py,sha256=BJa5_CkBzI7LdZL7ozs4zc2qVgIVV5Oqg3AxVg3qiNM,37165
37
- sycommon/rabbitmq/rabbitmq_service.py,sha256=pBApkWWcLyvwuk7av_8owtJVXjsJ28Mb9et8nzkxYGQ,27794
38
- sycommon/sse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- sycommon/sse/event.py,sha256=k_rBJy23R7crtzQeetT0Q73D8o5-5p-eESGSs_BPOj0,2797
40
- sycommon/sse/sse.py,sha256=__CfWEcYxOxQ-HpLor4LTZ5hLWqw9-2X7CngqbVHsfw,10128
41
- sycommon/synacos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- sycommon/synacos/feign.py,sha256=qALBl3YwVGvAzgx6tvwW84GptfS1u8WpapTRTygZROM,21282
43
- sycommon/synacos/nacos_service.py,sha256=WylpKPd6Q7xsqcvxWWwsLTauuQ1H94p596IQZVT429k,33863
44
- sycommon/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
46
- sycommon/tools/snowflake.py,sha256=rc-VUjBMMpdAvbnHroVwfVt1xzApJbTCthUy9mglAuw,237
47
- sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
48
- sycommon_python_lib-0.1.16.dist-info/METADATA,sha256=Ng_7vxoqZThJVeSOmS2AMsNbgtfKJTvIcn2qqbUvYzc,7005
49
- sycommon_python_lib-0.1.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
50
- sycommon_python_lib-0.1.16.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
51
- sycommon_python_lib-0.1.16.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
52
- sycommon_python_lib-0.1.16.dist-info/RECORD,,