gomyck-tools 1.0.2__tar.gz → 1.0.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 (62) hide show
  1. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/PKG-INFO +9 -1
  2. gomyck-tools-1.0.2/ctools/bottle_server.py → gomyck-tools-1.0.4/ctools/bottle_webserver.py +0 -26
  3. gomyck-tools-1.0.4/ctools/bottle_websocket.py +57 -0
  4. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/cjson.py +1 -1
  5. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/gomyck_tools.egg-info/PKG-INFO +9 -1
  6. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/gomyck_tools.egg-info/SOURCES.txt +2 -1
  7. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/gomyck_tools.egg-info/requires.txt +1 -1
  8. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/setup.py +4 -4
  9. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/README.md +0 -0
  10. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/__init__.py +0 -0
  11. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/aes_tools.py +0 -0
  12. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/api_result.py +0 -0
  13. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/application.py +0 -0
  14. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/b64.py +0 -0
  15. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/bashPath.py +0 -0
  16. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/browser_element_tools.py +0 -0
  17. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/call.py +0 -0
  18. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/ckafka.py +0 -0
  19. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/compile_tools.py +0 -0
  20. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/console.py +0 -0
  21. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/cron_lite.py +0 -0
  22. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/database.py +0 -0
  23. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/date_utils.py +0 -0
  24. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/douglas_rarefy.py +0 -0
  25. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/download_tools.py +0 -0
  26. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/enums.py +0 -0
  27. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/ex.py +0 -0
  28. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/excelOpt.py +0 -0
  29. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/html_soup.py +0 -0
  30. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/http_utils.py +0 -0
  31. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/id_worker_tools.py +0 -0
  32. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/images_tools.py +0 -0
  33. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/imgDialog.py +0 -0
  34. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/license.py +0 -0
  35. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/metrics.py +0 -0
  36. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/mqtt_utils.py +0 -0
  37. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/obj.py +0 -0
  38. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/pacth.py +0 -0
  39. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/plan_area_tools.py +0 -0
  40. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/process_pool.py +0 -0
  41. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/pty_tools.py +0 -0
  42. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/resource_bundle_tools.py +0 -0
  43. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/screenshot_tools.py +0 -0
  44. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/sign.py +0 -0
  45. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/sm_tools.py +0 -0
  46. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/ssh.py +0 -0
  47. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/strDiff.py +0 -0
  48. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/string_tools.py +0 -0
  49. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/sys_info.py +0 -0
  50. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/sys_log.py +0 -0
  51. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/thread_pool.py +0 -0
  52. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/upload_tools.py +0 -0
  53. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/web_base.py +0 -0
  54. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/win_canvas.py +0 -0
  55. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/win_control.py +0 -0
  56. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/wordFill.py +0 -0
  57. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/word_fill.py +0 -0
  58. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/word_fill_entity.py +0 -0
  59. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/ctools/work_path.py +0 -0
  60. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/gomyck_tools.egg-info/dependency_links.txt +0 -0
  61. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/gomyck_tools.egg-info/top_level.txt +0 -0
  62. {gomyck-tools-1.0.2 → gomyck-tools-1.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -10,5 +10,13 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: jsonpickle>=3.2.2
14
+ Requires-Dist: SQLAlchemy>=2.0.32
15
+ Requires-Dist: chardet>=5.2.0
16
+ Requires-Dist: psycopg2-binary>=2.9.9
17
+ Requires-Dist: croniter>=3.0.3
18
+ Requires-Dist: gmssl>=3.2.2
19
+ Requires-Dist: psutil>=6.0.0
20
+ Requires-Dist: jsonpath_ng>=1.6.1
13
21
 
14
22
  this package is for python development
@@ -1,8 +1,6 @@
1
1
  from bottle import ServerAdapter
2
2
  from socketserver import ThreadingMixIn
3
3
  from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, make_server
4
- from geventwebsocket.handler import WebSocketHandler
5
- from ctools import sys_log
6
4
 
7
5
  """
8
6
  app = init_app('/doc_download')
@@ -42,15 +40,6 @@ class ThreadedWSGIServer(ThreadingMixIn, WSGIServer): pass
42
40
  class CustomWSGIHandler(WSGIRequestHandler):
43
41
  def log_request(*args, **kw): pass
44
42
 
45
- class CustomWebSocketHandler(WebSocketHandler):
46
- def log_request(self):
47
- if '101' not in str(self.status):
48
- log_msg = self.format_request()
49
- for nk in sys_log.neglect_keywords:
50
- if nk in log_msg:
51
- return
52
- self.logger.info(log_msg)
53
-
54
43
  class WSGIRefServer(ServerAdapter):
55
44
 
56
45
  def __init__(self, host='0.0.0.0', port=8010):
@@ -65,18 +54,3 @@ class WSGIRefServer(ServerAdapter):
65
54
 
66
55
  def stop(self):
67
56
  self.server.shutdown()
68
-
69
-
70
- class WebSocketServer(ServerAdapter):
71
-
72
- def __init__(self, host='0.0.0.0', port=8011):
73
- super().__init__(host, port)
74
- self.server = None
75
-
76
- def run(self, handler):
77
- from gevent import pywsgi
78
- self.server = pywsgi.WSGIServer((self.host, self.port), handler, handler_class=CustomWebSocketHandler)
79
- self.server.serve_forever()
80
-
81
- def stop(self):
82
- self.server.stop()
@@ -0,0 +1,57 @@
1
+ from bottle import ServerAdapter
2
+ from geventwebsocket.handler import WebSocketHandler
3
+ from ctools import sys_log
4
+
5
+ """
6
+ app = init_app('/websocket_demo')
7
+
8
+ @app.route('/script_debug', apply=[websocket])
9
+ @rule('DOC:DOWNLOAD')
10
+ def script_debug(ws: WebSocket):
11
+ """
12
+
13
+ """
14
+ module_names = list(globals().keys())
15
+ def get_modules():
16
+ mods = []
17
+ for modname in module_names:
18
+ if modname == 'base' or modname == 'online' or modname.startswith('__') or modname == 'importlib': continue
19
+ module = globals()[modname]
20
+ mods.append(module)
21
+ return mods
22
+
23
+ def get_ws_modules():
24
+ from . import websocket
25
+ return [websocket]
26
+ """
27
+
28
+ """
29
+ http_app = Bottle()
30
+ for module in controller.get_modules():
31
+ log.debug('正在挂载http路由: {}'.format(module.app.context_path))
32
+ http_app.mount(module.app.context_path, module.app)
33
+ http_server = bottle_server.WSGIRefServer(port=application.Server.port)
34
+ http_app.run(server=http_server, quiet=True)
35
+ """
36
+ class CustomWebSocketHandler(WebSocketHandler):
37
+ def log_request(self):
38
+ if '101' not in str(self.status):
39
+ log_msg = self.format_request()
40
+ for nk in sys_log.neglect_keywords:
41
+ if nk in log_msg:
42
+ return
43
+ self.logger.info(log_msg)
44
+
45
+ class WebSocketServer(ServerAdapter):
46
+
47
+ def __init__(self, host='0.0.0.0', port=8011):
48
+ super().__init__(host, port)
49
+ self.server = None
50
+
51
+ def run(self, handler):
52
+ from gevent import pywsgi
53
+ self.server = pywsgi.WSGIServer((self.host, self.port), handler, handler_class=CustomWebSocketHandler)
54
+ self.server.serve_forever()
55
+
56
+ def stop(self):
57
+ self.server.stop()
@@ -4,7 +4,7 @@ import jsonpickle
4
4
  str_value_keys = []
5
5
  jsonpickle.set_preferred_backend('json')
6
6
  jsonpickle.set_encoder_options('json', ensure_ascii=False)
7
- jsonpickle.set_decoder_options('json', encoding='utf-8')
7
+ jsonpickle.set_decoder_options('json')
8
8
 
9
9
  def dumps(obj) -> str:
10
10
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -10,5 +10,13 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: jsonpickle>=3.2.2
14
+ Requires-Dist: SQLAlchemy>=2.0.32
15
+ Requires-Dist: chardet>=5.2.0
16
+ Requires-Dist: psycopg2-binary>=2.9.9
17
+ Requires-Dist: croniter>=3.0.3
18
+ Requires-Dist: gmssl>=3.2.2
19
+ Requires-Dist: psutil>=6.0.0
20
+ Requires-Dist: jsonpath_ng>=1.6.1
13
21
 
14
22
  this package is for python development
@@ -6,7 +6,8 @@ ctools/api_result.py
6
6
  ctools/application.py
7
7
  ctools/b64.py
8
8
  ctools/bashPath.py
9
- ctools/bottle_server.py
9
+ ctools/bottle_webserver.py
10
+ ctools/bottle_websocket.py
10
11
  ctools/browser_element_tools.py
11
12
  ctools/call.py
12
13
  ctools/cjson.py
@@ -3,6 +3,6 @@ SQLAlchemy>=2.0.32
3
3
  chardet>=5.2.0
4
4
  psycopg2-binary>=2.9.9
5
5
  croniter>=3.0.3
6
- pyautogui>=0.9.54
7
6
  gmssl>=3.2.2
8
7
  psutil>=6.0.0
8
+ jsonpath_ng>=1.6.1
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="gomyck-tools",
5
- version="1.0.2",
5
+ version="1.0.4",
6
6
  author="gomyck",
7
7
  author_email="hao474798383@163.com",
8
8
  description="A ctools for python development by hao474798383",
@@ -22,9 +22,9 @@ setup(
22
22
  "chardet>=5.2.0",
23
23
  "psycopg2-binary>=2.9.9",
24
24
  "croniter>=3.0.3",
25
- "pyautogui>=0.9.54",
26
- "gmssl>=3.2.2",
27
- "psutil>=6.0.0"
25
+ "gmssl>=3.2.2", # 国密
26
+ "psutil>=6.0.0",
27
+ "jsonpath_ng>=1.6.1"
28
28
  ],
29
29
  )
30
30
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes