psytricks 2.2.0a1__tar.gz → 2.2.0a3__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.
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/PKG-INFO +13 -10
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/README.md +7 -6
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/pyproject.toml +18 -10
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__init__.py +1 -1
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/psytricks-lib.ps1 +1 -1
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/decoder.py +6 -1
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/wrapper.py +570 -574
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/LICENSE +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/psytricks-wrapper.ps1 +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/restricks-server.example.xml +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/restricks-server.ps1 +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/sampledata/GetAccessUsers.json +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/sampledata/GetMachineStatus.json +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/__ps1__/sampledata/GetSessions.json +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/cli.py +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/literals.py +0 -0
- {psytricks-2.2.0a1 → psytricks-2.2.0a3}/src/psytricks/mappings.py +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: psytricks
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.0a3
|
|
4
4
|
Summary: PowerShell Python Citrix Tricks.
|
|
5
|
-
License: GPL-3.0-or-later
|
|
5
|
+
License-Expression: GPL-3.0-or-later
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Niko Ehrenfeuchter
|
|
7
8
|
Author-email: nikolaus.ehrenfeuchter@unibas.ch
|
|
8
9
|
Requires-Python: >=3.9,<4.0
|
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.9
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
17
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
16
18
|
Requires-Dist: loguru (>=0.7.0,<0.8.0)
|
|
17
19
|
Requires-Dist: requests (>=2.30.0,<3.0.0)
|
|
@@ -51,8 +53,9 @@ PSyTricks ships with two options for the PowerShell layer:
|
|
|
51
53
|
|
|
52
54
|
NOTE: this `RESTful` claim is actually not entirely true. Or basically not at
|
|
53
55
|
all, it would be better called an `HTTP-JSON-RPC-API`. We'll still be using the
|
|
54
|
-
term `REST` for it as
|
|
55
|
-
are coming across this label.
|
|
56
|
+
term `REST` for it as the functionality of this package basically serves a very
|
|
57
|
+
similar purpose to what people think of when they are coming across this label.
|
|
58
|
+
Apologies, [Roy T. Fielding][www_rtf].
|
|
56
59
|
|
|
57
60
|
## 🤯 Are you serious?
|
|
58
61
|
|
|
@@ -64,7 +67,7 @@ Really? 🧐
|
|
|
64
67
|
Or, not sure if that's any better, implementing an HTTP REST API in plain
|
|
65
68
|
PowerShell?!? 🫣
|
|
66
69
|
|
|
67
|
-
### ✅ Yes
|
|
70
|
+
### ✅ Yes, we are
|
|
68
71
|
|
|
69
72
|
*And the package name was chosen to reflect this.*
|
|
70
73
|
|
|
@@ -73,9 +76,9 @@ at all* an issue for us. Abysmal, as in: for every wrapped call a full (new)
|
|
|
73
76
|
PowerShell process needs to be instantiated, usually taking something like 1-2
|
|
74
77
|
seconds. ⏳
|
|
75
78
|
|
|
76
|
-
The REST interface provides a much better performance, at the cost of
|
|
77
|
-
additional setup. If you're happy to take on this approach, the package
|
|
78
|
-
very smooth ride. 🎢🎡
|
|
79
|
+
The REST / HTTP-RPC interface provides a much better performance, at the cost of
|
|
80
|
+
some additional setup. If you're happy to take on this approach, the package
|
|
81
|
+
offers a very smooth ride. 🎢🎡
|
|
79
82
|
|
|
80
83
|
## 🛠🚧 Installation
|
|
81
84
|
|
|
@@ -29,8 +29,9 @@ PSyTricks ships with two options for the PowerShell layer:
|
|
|
29
29
|
|
|
30
30
|
NOTE: this `RESTful` claim is actually not entirely true. Or basically not at
|
|
31
31
|
all, it would be better called an `HTTP-JSON-RPC-API`. We'll still be using the
|
|
32
|
-
term `REST` for it as
|
|
33
|
-
are coming across this label.
|
|
32
|
+
term `REST` for it as the functionality of this package basically serves a very
|
|
33
|
+
similar purpose to what people think of when they are coming across this label.
|
|
34
|
+
Apologies, [Roy T. Fielding][www_rtf].
|
|
34
35
|
|
|
35
36
|
## 🤯 Are you serious?
|
|
36
37
|
|
|
@@ -42,7 +43,7 @@ Really? 🧐
|
|
|
42
43
|
Or, not sure if that's any better, implementing an HTTP REST API in plain
|
|
43
44
|
PowerShell?!? 🫣
|
|
44
45
|
|
|
45
|
-
### ✅ Yes
|
|
46
|
+
### ✅ Yes, we are
|
|
46
47
|
|
|
47
48
|
*And the package name was chosen to reflect this.*
|
|
48
49
|
|
|
@@ -51,9 +52,9 @@ at all* an issue for us. Abysmal, as in: for every wrapped call a full (new)
|
|
|
51
52
|
PowerShell process needs to be instantiated, usually taking something like 1-2
|
|
52
53
|
seconds. ⏳
|
|
53
54
|
|
|
54
|
-
The REST interface provides a much better performance, at the cost of
|
|
55
|
-
additional setup. If you're happy to take on this approach, the package
|
|
56
|
-
very smooth ride. 🎢🎡
|
|
55
|
+
The REST / HTTP-RPC interface provides a much better performance, at the cost of
|
|
56
|
+
some additional setup. If you're happy to take on this approach, the package
|
|
57
|
+
offers a very smooth ride. 🎢🎡
|
|
57
58
|
|
|
58
59
|
## 🛠🚧 Installation
|
|
59
60
|
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
[
|
|
2
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "psytricks"
|
|
3
3
|
description = "PowerShell Python Citrix Tricks."
|
|
4
|
-
|
|
4
|
+
authors = [
|
|
5
|
+
{ name = "Niko Ehrenfeuchter", email = "nikolaus.ehrenfeuchter@unibas.ch" },
|
|
6
|
+
]
|
|
5
7
|
license = "GPL-3.0-or-later"
|
|
6
|
-
name = "psytricks"
|
|
7
8
|
readme = "README.md"
|
|
8
|
-
|
|
9
|
+
dynamic = []
|
|
10
|
+
version = "2.2.0-a.3"
|
|
11
|
+
|
|
12
|
+
[tool.poetry]
|
|
13
|
+
documentation = "https://imcf.one/apidocs/psytricks/psytricks.html"
|
|
9
14
|
|
|
10
15
|
[tool.poetry.urls]
|
|
11
16
|
"Changelog" = "https://github.com/imcf/psytricks/blob/main/CHANGELOG.md"
|
|
@@ -25,8 +30,11 @@ pylint = "^2.16.2"
|
|
|
25
30
|
[tool.poetry.scripts]
|
|
26
31
|
psytricks = "psytricks.cli:run_cli"
|
|
27
32
|
|
|
33
|
+
[tool.poetry.requires-plugins]
|
|
34
|
+
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
|
|
35
|
+
|
|
28
36
|
[tool.poetry-dynamic-versioning]
|
|
29
|
-
enable =
|
|
37
|
+
enable = true
|
|
30
38
|
style = "semver"
|
|
31
39
|
vcs = "git"
|
|
32
40
|
|
|
@@ -38,8 +46,7 @@ folders = [
|
|
|
38
46
|
|
|
39
47
|
[build-system]
|
|
40
48
|
build-backend = "poetry_dynamic_versioning.backend"
|
|
41
|
-
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
|
42
|
-
|
|
49
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
|
|
43
50
|
|
|
44
51
|
[tool.ruff.lint]
|
|
45
52
|
# exclude = [
|
|
@@ -49,7 +56,7 @@ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
|
|
49
56
|
select = [
|
|
50
57
|
"D",
|
|
51
58
|
"D203", # blank line required before class docstring
|
|
52
|
-
"D212", # summary lines
|
|
59
|
+
"D212", # summary lines must be on the first physical line of the docstring
|
|
53
60
|
"D401", # imperative mood for all docstrings
|
|
54
61
|
"D415", # summary line has to end in a punctuation mark
|
|
55
62
|
"D417", # require documentation for _all_ function parameters
|
|
@@ -57,7 +64,8 @@ select = [
|
|
|
57
64
|
|
|
58
65
|
ignore = [
|
|
59
66
|
"D202", # no blank lines allowed after function docstring
|
|
60
|
-
|
|
67
|
+
## D211 conflicts with ruff's formatting as of 2025-04-14, so don't use it:
|
|
68
|
+
# "D211", # no blank lines allowed before class docstring
|
|
61
69
|
]
|
|
62
70
|
|
|
63
71
|
|
|
@@ -46,7 +46,12 @@ def parse_powershell_json(json_dict):
|
|
|
46
46
|
ret[key] = datetime.fromtimestamp(int(epoch_ms[:10]))
|
|
47
47
|
elif key in by_keyword:
|
|
48
48
|
mapping = by_keyword[key]
|
|
49
|
-
|
|
49
|
+
try:
|
|
50
|
+
mapped_value = mapping[value]
|
|
51
|
+
except KeyError as err:
|
|
52
|
+
mapped_value = f"unknownvalue-{value}"
|
|
53
|
+
log.error(f"No mapping for value '{value}' - using '{mapped_value}'!")
|
|
54
|
+
log.trace(err)
|
|
50
55
|
log.trace(f"{key}: {value} -> {mapped_value}")
|
|
51
56
|
ret[key] = mapped_value
|
|
52
57
|
else:
|