MeUtils 2024.12.12.18.26.47__py3-none-any.whl → 2024.12.12.19.4.48__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.
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/METADATA +25 -25
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/RECORD +8 -8
- meutils/config_utils/manager.py +11 -9
- meutils/data/VERSION +1 -1
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/LICENSE +0 -0
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/WHEEL +0 -0
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/entry_points.txt +0 -0
- {MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: MeUtils
|
3
|
-
Version: 2024.12.12.
|
3
|
+
Version: 2024.12.12.19.4.48
|
4
4
|
Summary: description
|
5
5
|
Home-page: https://github.com/yuanjie-ai/MeUtils
|
6
6
|
Author: yuanjie
|
@@ -62,42 +62,42 @@ Requires-Dist: sse-starlette ; extra == 'ai'
|
|
62
62
|
Requires-Dist: openai ; extra == 'ai'
|
63
63
|
Requires-Dist: langchain ; extra == 'ai'
|
64
64
|
Provides-Extra: all
|
65
|
-
Requires-Dist:
|
66
|
-
Requires-Dist:
|
65
|
+
Requires-Dist: jinja2 ; extra == 'all'
|
66
|
+
Requires-Dist: fastapi[all] ; extra == 'all'
|
67
|
+
Requires-Dist: redis-py-cluster ; extra == 'all'
|
68
|
+
Requires-Dist: langchain ; extra == 'all'
|
69
|
+
Requires-Dist: fastapi ; extra == 'all'
|
70
|
+
Requires-Dist: cachetools ; extra == 'all'
|
67
71
|
Requires-Dist: pymongo ; extra == 'all'
|
72
|
+
Requires-Dist: asyncmy ; extra == 'all'
|
68
73
|
Requires-Dist: pymysql ; extra == 'all'
|
69
|
-
Requires-Dist:
|
70
|
-
Requires-Dist:
|
71
|
-
Requires-Dist:
|
72
|
-
Requires-Dist:
|
73
|
-
Requires-Dist: redis-py-cluster ; extra == 'all'
|
74
|
-
Requires-Dist: jinja2 ; extra == 'all'
|
74
|
+
Requires-Dist: gunicorn ; extra == 'all'
|
75
|
+
Requires-Dist: pymilvus ; extra == 'all'
|
76
|
+
Requires-Dist: reportlab ; extra == 'all'
|
77
|
+
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
75
78
|
Requires-Dist: pandas-summary ; extra == 'all'
|
76
|
-
Requires-Dist:
|
79
|
+
Requires-Dist: pymupd ; extra == 'all'
|
80
|
+
Requires-Dist: pyarrow ; extra == 'all'
|
81
|
+
Requires-Dist: sse-starlette ; extra == 'all'
|
82
|
+
Requires-Dist: iteration-utilities ; extra == 'all'
|
83
|
+
Requires-Dist: pretty-errors ; extra == 'all'
|
77
84
|
Requires-Dist: schedule ; extra == 'all'
|
78
|
-
Requires-Dist: jmespath ; extra == 'all'
|
79
85
|
Requires-Dist: seaborn ; extra == 'all'
|
80
|
-
Requires-Dist: pymupd ; extra == 'all'
|
81
|
-
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
82
86
|
Requires-Dist: missingno ; extra == 'all'
|
83
|
-
Requires-Dist:
|
84
|
-
Requires-Dist:
|
85
|
-
Requires-Dist: polars ; extra == 'all'
|
86
|
-
Requires-Dist: langchain ; extra == 'all'
|
87
|
-
Requires-Dist: asyncmy ; extra == 'all'
|
88
|
-
Requires-Dist: simplejson ; extra == 'all'
|
89
|
-
Requires-Dist: jieba ; extra == 'all'
|
90
|
-
Requires-Dist: cachetools ; extra == 'all'
|
87
|
+
Requires-Dist: openai ; extra == 'all'
|
88
|
+
Requires-Dist: uvicorn ; extra == 'all'
|
91
89
|
Requires-Dist: faiss-cpu ; extra == 'all'
|
92
|
-
Requires-Dist: pymilvus ; extra == 'all'
|
93
90
|
Requires-Dist: thriftpy2 ; extra == 'all'
|
91
|
+
Requires-Dist: jmespath ; extra == 'all'
|
92
|
+
Requires-Dist: simplejson ; extra == 'all'
|
94
93
|
Requires-Dist: streamlit ; extra == 'all'
|
95
|
-
Requires-Dist:
|
94
|
+
Requires-Dist: polars ; extra == 'all'
|
96
95
|
Requires-Dist: sqlalchemy ; extra == 'all'
|
97
|
-
Requires-Dist:
|
98
|
-
Requires-Dist: dataframe-image ; extra == 'all'
|
96
|
+
Requires-Dist: jieba ; extra == 'all'
|
99
97
|
Requires-Dist: thefuck ; extra == 'all'
|
100
98
|
Requires-Dist: filetype ; extra == 'all'
|
99
|
+
Requires-Dist: dataframe-image ; extra == 'all'
|
100
|
+
Requires-Dist: geopy ; extra == 'all'
|
101
101
|
Provides-Extra: ann
|
102
102
|
Requires-Dist: pymilvus ; extra == 'ann'
|
103
103
|
Requires-Dist: faiss-cpu ; extra == 'ann'
|
@@ -471,7 +471,7 @@ meutils/cmds/subprocess_demo.py,sha256=oTeTIx8k6XwtOT6hZpmy9XNcRErzilqWcdoxcrVcH
|
|
471
471
|
meutils/comp_utils/__init__.py,sha256=Q4BW-gHnOUiSSpupHsprsOAPp4kuBLcH60sL1RfS3PQ,361
|
472
472
|
meutils/comp_utils/reverse_metric.py,sha256=qwcGgiHhaupIJER4gO0HQhhO07FDLFv-vfFhg6K6Q4s,1705
|
473
473
|
meutils/config_utils/__init__.py,sha256=GhgsStfGJDC8F_YgC6X5Jnj9HkgXJXxeYiJWTAkWKTo,271
|
474
|
-
meutils/config_utils/manager.py,sha256=
|
474
|
+
meutils/config_utils/manager.py,sha256=li3NgSfbO3-QTo5NPkMD3Hl5dnEr5q_J5F2WgmyhRqk,3106
|
475
475
|
meutils/config_utils/nacosx.py,sha256=5x6WlCvjExaA7R9moBxc3DV9l1oFTtNazC6pObaYjMg,1110
|
476
476
|
meutils/config_utils/lark_utils/__init__.py,sha256=Gf-5Y8uZiqY9jdbfiIboL92MQjOTOo0ZZ245PGxCbaY,297
|
477
477
|
meutils/config_utils/lark_utils/common.py,sha256=WB1VKB3vdYyzqWosp5T-7uBIupNXl1L7SM3Lf5GRaOU,14274
|
@@ -479,7 +479,7 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
|
|
479
479
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
480
480
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
481
481
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
482
|
-
meutils/data/VERSION,sha256=
|
482
|
+
meutils/data/VERSION,sha256=dVfZd2A1H6Eivbd-XprrXnpN0aIbQ359KN1yqy-9m5A,19
|
483
483
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
484
484
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
485
485
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
@@ -816,9 +816,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
816
816
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
817
817
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
818
818
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
819
|
-
MeUtils-2024.12.12.
|
820
|
-
MeUtils-2024.12.12.
|
821
|
-
MeUtils-2024.12.12.
|
822
|
-
MeUtils-2024.12.12.
|
823
|
-
MeUtils-2024.12.12.
|
824
|
-
MeUtils-2024.12.12.
|
819
|
+
MeUtils-2024.12.12.19.4.48.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
820
|
+
MeUtils-2024.12.12.19.4.48.dist-info/METADATA,sha256=Jv1oYUjQjZ-E2BC4oZs_08Aq1pDdkB3333xZvh-lKOU,6170
|
821
|
+
MeUtils-2024.12.12.19.4.48.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
822
|
+
MeUtils-2024.12.12.19.4.48.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
823
|
+
MeUtils-2024.12.12.19.4.48.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
824
|
+
MeUtils-2024.12.12.19.4.48.dist-info/RECORD,,
|
meutils/config_utils/manager.py
CHANGED
@@ -12,7 +12,7 @@ import nacos
|
|
12
12
|
from meutils.pipe import *
|
13
13
|
|
14
14
|
|
15
|
-
class Manager:
|
15
|
+
class Manager(object):
|
16
16
|
_instance = None
|
17
17
|
_config: str = ""
|
18
18
|
|
@@ -67,41 +67,43 @@ class Manager:
|
|
67
67
|
|
68
68
|
@property
|
69
69
|
def json(self) -> Dict[str, Any]:
|
70
|
+
text = self._config
|
70
71
|
try:
|
71
|
-
return json.loads(
|
72
|
+
return json.loads(text)
|
72
73
|
except json.decoder.JSONDecodeError as e:
|
73
74
|
logger.warning(f"标准json 配置加载失败: {e}")
|
74
75
|
|
75
76
|
logger.debug(f"尝试用json_repair解析")
|
76
|
-
return json_repair.repair_json(
|
77
|
+
return json_repair.repair_json(text, return_objects=True)
|
77
78
|
|
78
79
|
@property
|
79
80
|
def yaml(self) -> Dict[str, Any]:
|
81
|
+
text = self._config
|
82
|
+
|
80
83
|
try:
|
81
|
-
return yaml.safe_load(
|
84
|
+
return yaml.safe_load(text)
|
82
85
|
except Exception as e:
|
83
86
|
logger.error(f"yaml 配置加载失败: {e}")
|
84
87
|
|
85
88
|
@property
|
86
89
|
def xml(self):
|
87
|
-
return self.
|
90
|
+
return self._config
|
88
91
|
|
89
92
|
@property
|
90
93
|
def html(self):
|
91
|
-
return self.
|
94
|
+
return self._config
|
92
95
|
|
93
96
|
@property
|
94
97
|
def properties(self):
|
95
|
-
return self.
|
98
|
+
return self._config
|
96
99
|
|
97
100
|
|
98
101
|
if __name__ == '__main__':
|
99
102
|
# 初始化配置管理器
|
100
103
|
namespace = 'test'
|
101
104
|
data_id = "testdata"
|
102
|
-
group = "DEFAULT_GROUP"
|
103
105
|
|
104
|
-
manager = Manager(namespace, data_id
|
106
|
+
manager = Manager(namespace, data_id)
|
105
107
|
# manager_ = Manager(namespace, data_id, group)
|
106
108
|
|
107
109
|
print(manager.text)
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2024.12.12.
|
1
|
+
2024.12.12.19.04.48
|
File without changes
|
File without changes
|
{MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/entry_points.txt
RENAMED
File without changes
|
{MeUtils-2024.12.12.18.26.47.dist-info → MeUtils-2024.12.12.19.4.48.dist-info}/top_level.txt
RENAMED
File without changes
|