You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,9 +69,24 @@ This package includes:
69
69
.. note:: for Windows `ProactorEventLoop` or another non-standard event loop should be used!
70
70
71
71
* `ExecResult` - class for execution results storage.
72
-
Contains exit code, stdout, stderr and getters for decoding as JSON, YAML, string, bytearray and brief strings (up to 7 lines).
72
+
Contains exit code, stdout, stderr and getters for decoding as JSON, YAML, XML (and LXML) element tree, string, bytearray
73
+
and brief strings (up to 7 lines).
73
74
74
-
* `ExitCodes` - enumerator for standard Linux exit codes. BASH return codes (broduced from signal codes) also available.
75
+
* `ExitCodes` - enumerator for standard Linux exit codes. BASH return codes (produced from signal codes) also available.
76
+
77
+
Installation
78
+
============
79
+
80
+
Standard: `pip install exec-helpers`
81
+
Extras:
82
+
83
+
* ``yaml`` - install `PyYaml` for yaml decoding (`PyYAML` is main decoder, `ruamel.YAML` also supported as fallback.)
84
+
85
+
* ``xml`` - install `defusedxml` for safe XML parsing to `xml.etree.ElementTree.Element`.
86
+
87
+
* ``lxml`` - install `lxml` for advanced XML parsing. Can be unsafe.
88
+
89
+
* ``ALL_FORMATS`` - install all parsers. When new parsers will be added, it will ne also supported.
75
90
76
91
Usage
77
92
=====
@@ -105,7 +120,7 @@ Creation from scratch:
105
120
)
106
121
107
122
Key is a main connection key (always tried first) and keys are alternate keys.
108
-
Key filename is afilename or list of filenames with keys, which should be loaded.
123
+
Key filename is a filename or list of filenames with keys, which should be loaded.
109
124
Passphrase is an alternate password for keys, if it differs from main password.
110
125
If main key now correct for username - alternate keys tried, if correct key found - it became main.
111
126
If no working key - password is used and None is set as main key.
@@ -223,11 +238,14 @@ Execution result object has a set of useful properties:
223
238
224
239
* `stdout_json` - STDOUT decoded as JSON.
225
240
226
-
* `stdout_yaml` - STDOUT decoded as YAML. Accessible only if PyYAML or ruamel.YAML library installed. (Option ``yaml``)
241
+
* `stdout_yaml` - STDOUT decoded as YAML. Accessible only if `PyYAML` or `ruamel.YAML` library installed.
242
+
(Extras: ``yaml``)
227
243
228
-
* `stdout_xml` - STDOUT decoded as XML to `ElementTree` using `defusedxml` library. Accessible only if `defusedxml` library installed. (Option ``xml``)
244
+
* `stdout_xml` - STDOUT decoded as XML to `ElementTree` using `defusedxml` library. Accessible only if `defusedxml` library installed.
245
+
(Extras: ``xml``)
229
246
230
-
* `stdout_lxml` - STDOUT decoded as XML to `ElementTree` using `lxml` library. Accessible only if `lxml` library installed. (Option ``lxml``) Can be insecure.
247
+
* `stdout_lxml` - STDOUT decoded as XML to `ElementTree` using `lxml` library. Accessible only if `lxml` library installed.
248
+
(Extras: ``lxml``) Can be insecure.
231
249
232
250
* `timestamp` -> `typing.Optional(datetime.datetime)`. Timestamp for received exit code.
0 commit comments