pywebexec 2.1.1__py3-none-any.whl → 2.1.3__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.
pywebexec/pywebexec.py CHANGED
@@ -906,7 +906,7 @@ def run_dynamic_command(cmd):
906
906
  })
907
907
  Path(get_output_file_path(command_id)).touch()
908
908
  if batch_values:
909
- params = ["-n", "-p", str(parallel), "-d", str(delay), "-P", *batch_values, '--', sys.argv[0], "-d", ".", "--", "run", cmd_path, *params]
909
+ params = ["-n", "-p", str(parallel), "-D", str(delay), "-P", *batch_values, '--', sys.argv[0], "-d", ".", "--", "run", cmd_path, *params]
910
910
  cmd_path = shutil.which("run-para")
911
911
  print(params)
912
912
  thread = threading.Thread(target=run_command, args=(request.remote_addr, user, cmd_path, params, command_id, rows, cols))
pywebexec/version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.1.1'
21
- __version_tuple__ = version_tuple = (2, 1, 1)
20
+ __version__ = version = '2.1.3'
21
+ __version_tuple__ = version_tuple = (2, 1, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 2.1.1
3
+ Version: 2.1.3
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -72,6 +72,10 @@ Requires-Dist: run-para>=1.0.2
72
72
  # pywebexec
73
73
  Simple Python HTTP(S) API/Web Server Command Launcher and Terminal sharing
74
74
 
75
+ * build a Restfull API/swagger-ui powered application in no time exposing simple commands/parameters.
76
+ * create a toolbox with batch management/parallel execution of commands
77
+ * share a terminal in one command
78
+
75
79
  ## Install
76
80
  ```
77
81
  $ pip install pywebexec
@@ -119,6 +123,8 @@ all commands output / statuses are available in the executables directory in sub
119
123
  * Uses gunicorn to serve http/https
120
124
  * Linux/MacOS compatible
121
125
  * Markdown help for commands
126
+ * YAML schema for commands parameters
127
+ * Batch/parallel command execution
122
128
 
123
129
  ## Customize server
124
130
  ```shell
@@ -245,7 +251,7 @@ command --param1 value --param2 1 --param3 value1 value2
245
251
 
246
252
  * On the web inferface, and swagger-ui the form will be generated from the schema.
247
253
 
248
- <img src="https://github.com/user-attachments/assets/c7cdf117-aa38-4366-97c7-1aa26e5ebf0d" width=400>
254
+ <img src="https://github.com/user-attachments/assets/c7cdf117-aa38-4366-97c7-1aa26e5ebf0d" width="400">
249
255
 
250
256
  When using schema, the command can now be launched with:
251
257
  ```
@@ -262,6 +268,17 @@ schema_options:
262
268
  convert_params: {"param1": "param2"} # convert param1 to param2
263
269
  ```
264
270
 
271
+ ## Batch commands/parallel execution
272
+
273
+ Integration of [run-para](https://github.com/joknarf/run-para) to enable batch execution of commands:
274
+ * In `schema_options` adding `batch_param` will enable batch mode for the command, the command will be executed for each value in the `batch_param` list.
275
+ * The `batch_param` is the name of the parameter that will be used to pass the different values for the parameter.
276
+ * The `batch_param` type will be transformed to textarea to provide list to use as parameter for the command.
277
+ * The range parameters `parallel` and `delay` is added to the command parameters to control the execution of the batch commands (nb jobs in parallel and initial delay between jobs).
278
+
279
+ <img src="https://github.com/user-attachments/assets/a25bf197-5c2e-4cec-9dd7-53f83c11656f" width="400">
280
+
281
+
265
282
  ## Swagger UI
266
283
 
267
284
  A custom swagger UI is available at `http[s]://<srv>/v0/documentation` with enhanced markdown rendering and form generation for body parameters.
@@ -1,8 +1,8 @@
1
1
  pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
2
2
  pywebexec/host_ip.py,sha256=Ud_HTflWVQ8789aoQ2RZdT1wGI-ccvrwSWGz_c7T3TI,1241
3
- pywebexec/pywebexec.py,sha256=pffAT2SEE4XVXng3n_dyFv9q0rslP829u3KwEtQ3Kbo,44634
3
+ pywebexec/pywebexec.py,sha256=VwmU1HZjEduogiBgIMoZPly_jdtHHJ5Qz6xMqflzC2E,44634
4
4
  pywebexec/swagger.yaml,sha256=zP_Nz69vZx0iwbKTwiQgSs8rJRUTiGKRyIkWzMPANOE,6688
5
- pywebexec/version.py,sha256=e93DN6a88mHp4XiW8PUMNpgcL72dYKhIYIiM2vzzNTM,511
5
+ pywebexec/version.py,sha256=BiGPztNyl3M8e5PrbQdJPlg8lFWgerKsXwbz544Fc2s,511
6
6
  pywebexec/static/css/form.css,sha256=EpYUaBt2wLYX-Vi4gq6ZFzR2LLu7bd2patNWe-BAhDs,4499
7
7
  pywebexec/static/css/markdown.css,sha256=3RzUnpVBdF6cQuB_NXV7hMTc0quYU8sfyuZcpsREj6A,1939
8
8
  pywebexec/static/css/style.css,sha256=ynccbEDzK07rurLm-UirUs5j_hVfXlIgaHeUIq9WvA0,9969
@@ -66,9 +66,9 @@ pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
66
66
  pywebexec/templates/index.html,sha256=KeNLBH9PN_ZuGhzwrjvRTj2oBtbINv_SbwGQpOahNWo,3820
67
67
  pywebexec/templates/popup.html,sha256=3kpMccKD_OLLhJ4Y9KRw6Ny8wQWjVaRrUfV9y5-bDiQ,1580
68
68
  pywebexec/templates/swagger_ui.html,sha256=9ngyldkyEdLonBjl97mbIZUlVk-jxwcHrvFzMSrveyU,1067
69
- pywebexec-2.1.1.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
70
- pywebexec-2.1.1.dist-info/METADATA,sha256=sGa_oCn_kmuX93GiSmw5yiaxf9Nud2zb-mXOl4vDUdU,11675
71
- pywebexec-2.1.1.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
72
- pywebexec-2.1.1.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
73
- pywebexec-2.1.1.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
74
- pywebexec-2.1.1.dist-info/RECORD,,
69
+ pywebexec-2.1.3.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
70
+ pywebexec-2.1.3.dist-info/METADATA,sha256=2mJ_RusvfJiAZpS0ayCvnASqxbHzuhIFZruc9ZXFN6Q,12776
71
+ pywebexec-2.1.3.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
72
+ pywebexec-2.1.3.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
73
+ pywebexec-2.1.3.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
74
+ pywebexec-2.1.3.dist-info/RECORD,,