ryry-cli 2.93__tar.gz → 2.94__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.
- {ryry-cli-2.93 → ryry_cli-2.94}/PKG-INFO +67 -56
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/constant.py +10 -10
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/main.py +13 -11
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/ryry_server_socket.py +40 -1
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/ryry_service.py +2 -2
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/ryry_webapi.py +2 -10
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/ryry_widget.py +5 -4
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/store.py +4 -2
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/taskUtils.py +35 -35
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/PKG-INFO +67 -56
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/requires.txt +0 -1
- {ryry-cli-2.93 → ryry_cli-2.94}/setup.cfg +4 -4
- {ryry-cli-2.93 → ryry_cli-2.94}/setup.py +1 -2
- {ryry-cli-2.93 → ryry_cli-2.94}/LICENSE +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/README.md +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/__init__.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/script_template/__init__.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/script_template/main.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/script_template/run.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/server_func.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/task.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/upload.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry/utils.py +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry-cli-2.93 → ryry_cli-2.94}/ryry_cli.egg-info/top_level.txt +0 -0
|
@@ -1,56 +1,67 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: ryry-cli
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: ryry tools
|
|
5
|
-
Home-page: https://github.com/dalipenMedia
|
|
6
|
-
Author: dalipen
|
|
7
|
-
Author-email: dalipen01@gmail.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.4
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
------------
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
$ ryry widget
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ryry-cli
|
|
3
|
+
Version: 2.94
|
|
4
|
+
Summary: ryry tools
|
|
5
|
+
Home-page: https://github.com/dalipenMedia
|
|
6
|
+
Author: dalipen
|
|
7
|
+
Author-email: dalipen01@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.4
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: uuid
|
|
16
|
+
Requires-Dist: Image
|
|
17
|
+
Requires-Dist: pillow
|
|
18
|
+
Requires-Dist: psutil
|
|
19
|
+
Requires-Dist: pynvml
|
|
20
|
+
Requires-Dist: requests_toolbelt
|
|
21
|
+
Requires-Dist: fake_useragent
|
|
22
|
+
Requires-Dist: gputil
|
|
23
|
+
Requires-Dist: urlparser
|
|
24
|
+
Requires-Dist: urllib3
|
|
25
|
+
|
|
26
|
+
ryry Python Tool
|
|
27
|
+
===============================================
|
|
28
|
+
The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
|
|
29
|
+
|
|
30
|
+
Installation
|
|
31
|
+
------------
|
|
32
|
+
|
|
33
|
+
The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
|
|
34
|
+
|
|
35
|
+
##### Installing
|
|
36
|
+
pip install ryry-cli
|
|
37
|
+
|
|
38
|
+
##### Uninstalling
|
|
39
|
+
pip uninstall ryry-cli
|
|
40
|
+
|
|
41
|
+
Use
|
|
42
|
+
------------
|
|
43
|
+
##### 1. Running
|
|
44
|
+
$ ryry service start
|
|
45
|
+
start a process to wait for the server to issue tasks. **Please do not close it**
|
|
46
|
+
|
|
47
|
+
Module Developer
|
|
48
|
+
------------
|
|
49
|
+
$ ryry widget init
|
|
50
|
+
|
|
51
|
+
in empty folder, use above command craete a ryry module, structure is like
|
|
52
|
+
|
|
53
|
+
[widget folder]
|
|
54
|
+
|-- config.json //*required, do not change*
|
|
55
|
+
|-- main.py //*required, do not change*
|
|
56
|
+
|-- run.py
|
|
57
|
+
|
|
58
|
+
if other person share widget code to you , you can add widget path in your computer to ryry environment
|
|
59
|
+
|
|
60
|
+
$ ryry widget add [path_with_widget_code]
|
|
61
|
+
|
|
62
|
+
you can modify script and h5 file yourself, then publish to ryry sever
|
|
63
|
+
|
|
64
|
+
$ ryry widget publish
|
|
65
|
+
|
|
66
|
+
get ryry status
|
|
67
|
+
$ ryry services status
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!!!!! do not change this file !!!!!
|
|
2
|
-
app_version="2.
|
|
3
|
-
app_bulld_anchor="Noh_2025-
|
|
4
|
-
app_name="ryry-cli"
|
|
5
|
-
import sys, os
|
|
6
|
-
if getattr(sys, 'frozen', False):
|
|
7
|
-
base_path = sys._MEIPASS
|
|
8
|
-
else:
|
|
9
|
-
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
-
|
|
1
|
+
#!!!!! do not change this file !!!!!
|
|
2
|
+
app_version="2.94"
|
|
3
|
+
app_bulld_anchor="Noh_2025-03-10 19:34:06.015293"
|
|
4
|
+
app_name="ryry-cli"
|
|
5
|
+
import sys, os
|
|
6
|
+
if getattr(sys, 'frozen', False):
|
|
7
|
+
base_path = sys._MEIPASS
|
|
8
|
+
else:
|
|
9
|
+
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
|
|
@@ -7,7 +7,7 @@ from ryry import store
|
|
|
7
7
|
from ryry import utils
|
|
8
8
|
from ryry import taskUtils
|
|
9
9
|
|
|
10
|
-
ll =
|
|
10
|
+
ll = 29
|
|
11
11
|
def scr_str(s):
|
|
12
12
|
return "| " + s + " |"
|
|
13
13
|
def scr_str1(s):
|
|
@@ -87,17 +87,19 @@ def widget_status(stdscr, idx):
|
|
|
87
87
|
maxJust = len(it)
|
|
88
88
|
maxJust += 5
|
|
89
89
|
for it in widget_map:
|
|
90
|
-
path = ""
|
|
91
|
-
is_block =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
else:
|
|
96
|
-
path = map[it]
|
|
90
|
+
path = widget_map[it]["path"]
|
|
91
|
+
is_block = widget_map[it]["isBlock"]
|
|
92
|
+
name = widget_map[it]["name"]
|
|
93
|
+
version = widget_map[it].get("version", "1.0")
|
|
94
|
+
max_task_number = widget_map[it].get("max_task_number", 1)
|
|
97
95
|
end_args = ""
|
|
98
96
|
if is_block:
|
|
99
|
-
end_args = "
|
|
100
|
-
real_stdsrc(idx, 0, scr_str(f'{f"{it}{end_args}".ljust(maxJust)}
|
|
97
|
+
end_args = "[X]"
|
|
98
|
+
real_stdsrc(idx, 0, scr_str(f'{f"[{name} {version}]{it}{end_args} @ {max_task_number} ".ljust(maxJust)}'.ljust(ll*3-2)))
|
|
99
|
+
idx+=1
|
|
100
|
+
real_stdsrc(idx, 0, scr_str(f' {path}'.ljust(ll*3-2)))
|
|
101
|
+
idx+=1
|
|
102
|
+
real_stdsrc(idx, 0, scr_str(f' '.ljust(ll*3-2)))
|
|
101
103
|
idx+=1
|
|
102
104
|
return idx
|
|
103
105
|
|
|
@@ -293,4 +295,4 @@ def main():
|
|
|
293
295
|
status()
|
|
294
296
|
|
|
295
297
|
if __name__ == '__main__':
|
|
296
|
-
|
|
298
|
+
status()
|
|
@@ -22,6 +22,7 @@ class RyryTaskExecutor(Thread):
|
|
|
22
22
|
is_running = False
|
|
23
23
|
task_queue = None
|
|
24
24
|
ttt = 0
|
|
25
|
+
widgetPower = {}
|
|
25
26
|
|
|
26
27
|
def appendTask(self, data, callback):
|
|
27
28
|
self.cur_counter+=1
|
|
@@ -35,6 +36,24 @@ class RyryTaskExecutor(Thread):
|
|
|
35
36
|
def idlePower(self):
|
|
36
37
|
return self.max_counter - self.cur_counter
|
|
37
38
|
|
|
39
|
+
def widgetHasPower(self, cur_widget_id):
|
|
40
|
+
if cur_widget_id in self.widgetPower:
|
|
41
|
+
return self.widgetPower[cur_widget_id]["cur"] < self.widgetPower[cur_widget_id]["max"]
|
|
42
|
+
return True#widget找不到的话就当作可以接
|
|
43
|
+
|
|
44
|
+
def addWidgetPower(self, widget_id, max_task_number):
|
|
45
|
+
if widget_id not in self.widgetPower:
|
|
46
|
+
self.widgetPower[widget_id] = {
|
|
47
|
+
}
|
|
48
|
+
self.widgetPower[widget_id]["max"] = max_task_number
|
|
49
|
+
self.widgetPower[widget_id]["cur"] = 1
|
|
50
|
+
|
|
51
|
+
def delWidgetPower(self, widget_id):
|
|
52
|
+
if widget_id not in self.widgetPower:
|
|
53
|
+
self.widgetPower[widget_id] = {
|
|
54
|
+
}
|
|
55
|
+
self.widgetPower[widget_id]["cur"] = self.widgetPower[widget_id]["cur"] - 1
|
|
56
|
+
|
|
38
57
|
def isWorking(self):
|
|
39
58
|
return self.cur_counter > 0
|
|
40
59
|
|
|
@@ -45,15 +64,23 @@ class RyryTaskExecutor(Thread):
|
|
|
45
64
|
self.max_counter = store.get_multithread()
|
|
46
65
|
self.is_running = True
|
|
47
66
|
self.THEADING_LIST = []
|
|
67
|
+
self.widgetPower = {}
|
|
48
68
|
self.start()
|
|
49
69
|
|
|
50
70
|
def taskRunning(self):
|
|
71
|
+
print(f" - {current_thread().name} waiting")
|
|
51
72
|
while self.is_running:
|
|
52
73
|
try:
|
|
53
74
|
data, callback = self.task_queue.get()
|
|
54
75
|
if data is None:
|
|
55
76
|
break
|
|
56
77
|
try:
|
|
78
|
+
data_config = json.loads(data["config"])
|
|
79
|
+
widget_id = data_config["widget_id"]
|
|
80
|
+
max_task_number = data_config.get("max_task_number", 0)
|
|
81
|
+
if max_task_number <= 0:
|
|
82
|
+
max_task_number = task.maxTaskNumberWithWidget(widget_id)
|
|
83
|
+
|
|
57
84
|
taskUUID = data["taskUUID"]
|
|
58
85
|
domain = ""
|
|
59
86
|
params_tmp = json.loads(data["data"])
|
|
@@ -64,12 +91,14 @@ class RyryTaskExecutor(Thread):
|
|
|
64
91
|
timeout = data["timeout"]
|
|
65
92
|
taskUtils.taskPrint(taskUUID, f"{current_thread().name} === receive task : {taskUUID}")
|
|
66
93
|
_appendTask(taskUUID, domain)
|
|
94
|
+
self.addWidgetPower(widget_id, max_task_number)
|
|
67
95
|
is_ok, msg, result = task.runTask(data, timeout)
|
|
68
96
|
if is_ok == False:
|
|
69
97
|
taskUtils.notifyTaskFail(taskUUID, msg)
|
|
70
98
|
self.cur_counter-=1
|
|
71
99
|
callback(taskUUID, is_ok, msg, result)
|
|
72
100
|
_removeTask(taskUUID)
|
|
101
|
+
self.delWidgetPower(widget_id)
|
|
73
102
|
except Exception as e:
|
|
74
103
|
taskUtils.taskPrint(taskUUID, f"{current_thread().name} === task exception : {e}")
|
|
75
104
|
taskUtils.notifyScriptError(taskUUID)
|
|
@@ -180,7 +209,17 @@ class RyryShortConnectThread(Thread):
|
|
|
180
209
|
if self.executor.idlePower() == 0:
|
|
181
210
|
time.sleep(1)
|
|
182
211
|
continue
|
|
183
|
-
|
|
212
|
+
|
|
213
|
+
widget_list = []
|
|
214
|
+
map = store.widgetMap()
|
|
215
|
+
for it in map:
|
|
216
|
+
if isinstance(map[it], (dict)):
|
|
217
|
+
if map[it]["isBlock"] == False and self.executor.widgetHasPower(it):
|
|
218
|
+
widget_list.append(it)
|
|
219
|
+
else:
|
|
220
|
+
if self.executor.widgetHasPower(it):
|
|
221
|
+
widget_list.append(it)
|
|
222
|
+
datas = ryry_webapi.GetTask(widget_list)
|
|
184
223
|
for it in datas:
|
|
185
224
|
self.executor.appendTask(it, self.taskCallback)
|
|
186
225
|
|
|
@@ -80,7 +80,7 @@ class ryryService:
|
|
|
80
80
|
#3: service step
|
|
81
81
|
while (os.path.exists(stop_file) == False):
|
|
82
82
|
time.sleep(10)
|
|
83
|
-
print("
|
|
83
|
+
print("Prepare stop")
|
|
84
84
|
with open(stop_thread_file, 'w') as f:
|
|
85
85
|
f.write("")
|
|
86
86
|
for t in self.THEADING_LIST:
|
|
@@ -95,7 +95,7 @@ class ryryService:
|
|
|
95
95
|
if os.path.exists(stop_file):
|
|
96
96
|
os.remove(stop_file)
|
|
97
97
|
taskUtils.offlineNotify()
|
|
98
|
-
print("
|
|
98
|
+
print("Service has ended!")
|
|
99
99
|
utils.check_restart()
|
|
100
100
|
sys.stdout.close()
|
|
101
101
|
|
|
@@ -48,17 +48,9 @@ def ServerTaskConfig():
|
|
|
48
48
|
consecutive_step = r3["step"]
|
|
49
49
|
return min_wait_time, max_wait_time, consecutive_step
|
|
50
50
|
|
|
51
|
-
def GetTask():
|
|
52
|
-
widget_map = []
|
|
53
|
-
map = store.widgetMap()
|
|
54
|
-
for it in map:
|
|
55
|
-
if isinstance(map[it], (dict)):
|
|
56
|
-
if map[it]["isBlock"] == False:
|
|
57
|
-
widget_map.append(it)
|
|
58
|
-
else:
|
|
59
|
-
widget_map.append(it)
|
|
51
|
+
def GetTask(widget_list):
|
|
60
52
|
req = {
|
|
61
|
-
"widget_map": json.dumps(
|
|
53
|
+
"widget_map": json.dumps(widget_list),
|
|
62
54
|
"limit": 1,
|
|
63
55
|
"extend": store.extend()
|
|
64
56
|
}
|
|
@@ -87,6 +87,7 @@ def setWidgetData(root, widgetid):
|
|
|
87
87
|
data["widget_id"] = widgetid
|
|
88
88
|
data["name"] = "Demo"
|
|
89
89
|
data["version"] = "1.0"
|
|
90
|
+
data["max_task_number"] = 1
|
|
90
91
|
data["cmd"] = os.path.join(root, "main.py")
|
|
91
92
|
with open(os.path.join(root, "config.json"), 'w') as f:
|
|
92
93
|
json.dump(data, f)
|
|
@@ -144,11 +145,11 @@ def addWidgetToEnv(name_or_root, mute=False):
|
|
|
144
145
|
return
|
|
145
146
|
data = GetWidgetConfig(root)
|
|
146
147
|
widget_id = data["widget_id"]
|
|
147
|
-
name = ""
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
name = data["name"]
|
|
149
|
+
version = data["version"]
|
|
150
|
+
max_task_number = data["max_task_number"]
|
|
150
151
|
mainPythonPath = os.path.join(root, "main.py")
|
|
151
|
-
store.insertWidget(widget_id, name, mainPythonPath)
|
|
152
|
+
store.insertWidget(widget_id, name, version, max_task_number, mainPythonPath)
|
|
152
153
|
if mute == False:
|
|
153
154
|
print(f"add {widget_id.ljust(len(widget_id)+4)} {mainPythonPath}")
|
|
154
155
|
|
|
@@ -53,7 +53,7 @@ def widgetMap():
|
|
|
53
53
|
else:
|
|
54
54
|
return {}
|
|
55
55
|
|
|
56
|
-
def insertWidget(widget_id, name, path):
|
|
56
|
+
def insertWidget(widget_id, name, version, max_task_number, path):
|
|
57
57
|
sp = Store()
|
|
58
58
|
read_data = sp.read()
|
|
59
59
|
if "widgets" not in read_data:
|
|
@@ -65,7 +65,9 @@ def insertWidget(widget_id, name, path):
|
|
|
65
65
|
widgetsMap[widget_id] = {
|
|
66
66
|
"isBlock": False,
|
|
67
67
|
"path" : path,
|
|
68
|
-
"name" : name
|
|
68
|
+
"name" : name,
|
|
69
|
+
"version" : version,
|
|
70
|
+
"max_task_number" : max_task_number
|
|
69
71
|
}
|
|
70
72
|
for k in list(widgetsMap.keys()):
|
|
71
73
|
if isinstance(widgetsMap[k], (dict)):
|
|
@@ -240,41 +240,41 @@ def notifyCounterIfNeed():
|
|
|
240
240
|
}
|
|
241
241
|
})
|
|
242
242
|
|
|
243
|
-
import subprocess, platform
|
|
244
|
-
#darwin Command Line cannot create pyplot gui because not application with gui
|
|
245
|
-
if platform.system() != 'Darwin':
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
243
|
+
# import subprocess, platform
|
|
244
|
+
# #darwin Command Line cannot create pyplot gui because not application with gui
|
|
245
|
+
# if platform.system() != 'Darwin':
|
|
246
|
+
# try:
|
|
247
|
+
# import matplotlib.pyplot as plt
|
|
248
|
+
# plt.figure(figsize=(8,3))
|
|
249
|
+
# plt.rcParams.update({
|
|
250
|
+
# 'font.size': 7
|
|
251
|
+
# })
|
|
252
|
+
# plt.bar(t_l, s_l, color='g', label='success')
|
|
253
|
+
# plt.bar(t_l, f_l, bottom=s_l, color='r', label='fail')
|
|
254
|
+
# plt.title(f'[{socket.gethostname()}] [{yesterday}] success/fail={s_cnt}/{f_cnt}')
|
|
255
|
+
# plt.xlabel('time')
|
|
256
|
+
# plt.xticks(ticks=t_l,rotation=45)
|
|
257
|
+
# plt.ylabel('count')
|
|
258
|
+
# plt.subplots_adjust(bottom=0.25)
|
|
259
|
+
# plt.legend()
|
|
260
|
+
# fff = os.path.join(constant.base_path, "plt.png")
|
|
261
|
+
# plt.savefig(fff)
|
|
262
|
+
# with open(fff, "rb") as f:
|
|
263
|
+
# encode_string = str(base64.b64encode(f.read()), encoding='utf-8')
|
|
264
|
+
# md5 = hashlib.md5()
|
|
265
|
+
# md5.update(base64.b64decode(encode_string))
|
|
266
|
+
# hash = md5.hexdigest()
|
|
267
|
+
# notifyWechatRobot({
|
|
268
|
+
# "msgtype": "image",
|
|
269
|
+
# "image": {
|
|
270
|
+
# "base64": encode_string,
|
|
271
|
+
# "md5": hash
|
|
272
|
+
# }
|
|
273
|
+
# })
|
|
274
|
+
# os.remove(fff)
|
|
275
|
+
# os.remove(task_counter_file)
|
|
276
|
+
# except:
|
|
277
|
+
# pass
|
|
278
278
|
|
|
279
279
|
def saveCounter(taskUUID, duration, isSuccess):
|
|
280
280
|
try:
|
|
@@ -1,56 +1,67 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: ryry-cli
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: ryry tools
|
|
5
|
-
Home-page: https://github.com/dalipenMedia
|
|
6
|
-
Author: dalipen
|
|
7
|
-
Author-email: dalipen01@gmail.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.4
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
------------
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
$ ryry widget
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ryry-cli
|
|
3
|
+
Version: 2.94
|
|
4
|
+
Summary: ryry tools
|
|
5
|
+
Home-page: https://github.com/dalipenMedia
|
|
6
|
+
Author: dalipen
|
|
7
|
+
Author-email: dalipen01@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.4
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: uuid
|
|
16
|
+
Requires-Dist: Image
|
|
17
|
+
Requires-Dist: pillow
|
|
18
|
+
Requires-Dist: psutil
|
|
19
|
+
Requires-Dist: pynvml
|
|
20
|
+
Requires-Dist: requests_toolbelt
|
|
21
|
+
Requires-Dist: fake_useragent
|
|
22
|
+
Requires-Dist: gputil
|
|
23
|
+
Requires-Dist: urlparser
|
|
24
|
+
Requires-Dist: urllib3
|
|
25
|
+
|
|
26
|
+
ryry Python Tool
|
|
27
|
+
===============================================
|
|
28
|
+
The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
|
|
29
|
+
|
|
30
|
+
Installation
|
|
31
|
+
------------
|
|
32
|
+
|
|
33
|
+
The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
|
|
34
|
+
|
|
35
|
+
##### Installing
|
|
36
|
+
pip install ryry-cli
|
|
37
|
+
|
|
38
|
+
##### Uninstalling
|
|
39
|
+
pip uninstall ryry-cli
|
|
40
|
+
|
|
41
|
+
Use
|
|
42
|
+
------------
|
|
43
|
+
##### 1. Running
|
|
44
|
+
$ ryry service start
|
|
45
|
+
start a process to wait for the server to issue tasks. **Please do not close it**
|
|
46
|
+
|
|
47
|
+
Module Developer
|
|
48
|
+
------------
|
|
49
|
+
$ ryry widget init
|
|
50
|
+
|
|
51
|
+
in empty folder, use above command craete a ryry module, structure is like
|
|
52
|
+
|
|
53
|
+
[widget folder]
|
|
54
|
+
|-- config.json //*required, do not change*
|
|
55
|
+
|-- main.py //*required, do not change*
|
|
56
|
+
|-- run.py
|
|
57
|
+
|
|
58
|
+
if other person share widget code to you , you can add widget path in your computer to ryry environment
|
|
59
|
+
|
|
60
|
+
$ ryry widget add [path_with_widget_code]
|
|
61
|
+
|
|
62
|
+
you can modify script and h5 file yourself, then publish to ryry sever
|
|
63
|
+
|
|
64
|
+
$ ryry widget publish
|
|
65
|
+
|
|
66
|
+
get ryry status
|
|
67
|
+
$ ryry services status
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "2.
|
|
6
|
+
ryry_version = "2.94"
|
|
7
7
|
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
|
8
8
|
constanspy = os.path.join(cur_dir, "ryry", "constant.py")
|
|
9
9
|
try:
|
|
@@ -65,7 +65,6 @@ setuptools.setup(
|
|
|
65
65
|
'psutil',
|
|
66
66
|
'pynvml',
|
|
67
67
|
'requests_toolbelt',
|
|
68
|
-
'matplotlib',
|
|
69
68
|
'fake_useragent',
|
|
70
69
|
'gputil',
|
|
71
70
|
'urlparser',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|