xtn-tools-pro 1.0.0.2.6__tar.gz → 1.0.0.2.7__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. {xtn-tools-pro-1.0.0.2.6/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.2.7}/PKG-INFO +1 -1
  2. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/setup.py +1 -1
  3. xtn-tools-pro-1.0.0.2.7/xtn_tools_pro/task_pro/go_fun.py +54 -0
  4. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
  5. xtn-tools-pro-1.0.0.2.6/xtn_tools_pro/task_pro/go_fun.py +0 -43
  6. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/LICENSE +0 -0
  7. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/README.md +0 -0
  8. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/setup.cfg +0 -0
  9. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/__init__.py +0 -0
  10. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/db/MongoDB.py +0 -0
  11. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/db/MysqlDB.py +0 -0
  12. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/db/RedisDB.py +0 -0
  13. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/db/__init__.py +0 -0
  14. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/proxy/XiaoXiangProxy.py +0 -0
  15. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/proxy/__init__.py +0 -0
  16. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/proxy/proxy.py +0 -0
  17. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/task_pro/__init__.py +0 -0
  18. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/tools.py +0 -0
  19. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/__init__.py +0 -0
  20. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/crypto.py +0 -0
  21. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/file_utils.py +0 -0
  22. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/helpers.py +0 -0
  23. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/log.py +0 -0
  24. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/retry.py +0 -0
  25. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/sql.py +0 -0
  26. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro/utils/time_utils.py +0 -0
  27. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
  28. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
  29. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro.egg-info/requires.txt +0 -0
  30. {xtn-tools-pro-1.0.0.2.6 → xtn-tools-pro-1.0.0.2.7}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.2.6
3
+ Version: 1.0.0.2.7
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -15,7 +15,7 @@ with open("README.md", "r") as f:
15
15
 
16
16
  setuptools.setup(
17
17
  name="xtn-tools-pro", # 模块名称
18
- version="1.0.0.2.6", # 版本
18
+ version="1.0.0.2.7", # 版本
19
19
  author="xtn", # 作者
20
20
  author_email="czw011122@gmail.com", # 作者邮箱
21
21
  description="xtn 开发工具", # 模块简介
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ # 说明:
5
+ # 程序说明xxxxxxxxxxxxxxxxxxx
6
+ # History:
7
+ # Date Author Version Modification
8
+ # --------------------------------------------------------------------------------------------------
9
+ # 2025/1/14 xiatn V00.01.000 新建
10
+ # --------------------------------------------------------------------------------------------------
11
+ import os
12
+ import configparser
13
+ from xtn_tools_pro.utils.file_utils import check_file_exists
14
+
15
+
16
+ class GoFun:
17
+ def __init__(self, ini_dict):
18
+ # 读取配置信息
19
+ host = ini_dict.get('host', '')
20
+ port = ini_dict.get('port', 0)
21
+ task = ini_dict.get('task', '')
22
+ auto = ini_dict.get('auto', '')
23
+ is_processes = ini_dict.get('is_processes', False)
24
+ processes_num = ini_dict.get('processes_num', 0)
25
+ is_thread = ini_dict.get('is_thread', False)
26
+ thread_num = ini_dict.get('thread_num', 0)
27
+
28
+ self.__ini_info = {
29
+ "host": host,
30
+ "port": port,
31
+ "task": task,
32
+ "auto": auto,
33
+ "is_processes": is_processes,
34
+ "processes_num": processes_num,
35
+ "is_thread": is_thread,
36
+ "thread_num": thread_num,
37
+ }
38
+
39
+ for server_k, server_v in self.__ini_info.items():
40
+ if not server_v and server_k not in ["port", "is_processes", "processes_num", "is_thread", "thread_num"]:
41
+ raise Exception(f"ini_dict 配置 {server_k} 不存在")
42
+
43
+ if port:
44
+ task_host = f"http://{host}:{port}"
45
+ else:
46
+ task_host = f"http://{host}"
47
+
48
+ download_url = task_host + "/filter_server/phone/get"
49
+ upload_url = task_host + "/filter_server/phone/update"
50
+
51
+ self.__ini_info["download_url"] = download_url
52
+ self.__ini_info["upload_url"] = upload_url
53
+
54
+ print(self.__ini_info)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.2.6
3
+ Version: 1.0.0.2.7
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -1,43 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
-
4
- # 说明:
5
- # 程序说明xxxxxxxxxxxxxxxxxxx
6
- # History:
7
- # Date Author Version Modification
8
- # --------------------------------------------------------------------------------------------------
9
- # 2025/1/14 xiatn V00.01.000 新建
10
- # --------------------------------------------------------------------------------------------------
11
- import os
12
- import configparser
13
- from xtn_tools_pro.utils.file_utils import check_file_exists
14
-
15
-
16
- class GoFun:
17
- def __init__(self, ini_file=""):
18
- if not ini_file:
19
- ini_current_dir = os.getcwd()
20
- ini_file = os.path.join(ini_current_dir, "st.ini")
21
- if not check_file_exists(ini_file):
22
- raise Exception("st.ini 配置文件不存在,请在当前文件夹中新建该配置文件")
23
-
24
- # 读取配置信息
25
- config = configparser.ConfigParser()
26
- config.read(ini_file)
27
- server_host = config.get('server', 'host')
28
- server_port = config.get('server', 'port')
29
- server_task = config.get('server', 'task')
30
- server_auto = config.get('server', 'auto')
31
-
32
- print(server_host, server_port, server_task)
33
- if server_port:
34
- task_host = f"http://{server_host}:{server_port}"
35
- else:
36
- task_host = f"http://{server_host}"
37
-
38
- download_url = task_host + "/filter_server/phone/get"
39
- upload_url = task_host + "/filter_server/phone/update"
40
-
41
- print(server_auto)
42
- print(download_url)
43
- print(upload_url)