zosmfrestapi 0.2.0__tar.gz → 0.2.1__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.
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/PKG-INFO +5 -5
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/README.md +3 -3
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/pyproject.toml +103 -97
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/__init__.py +10 -5
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/LICENSE +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/__init__.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/client.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/exceptions/__init__.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/exceptions/authentication.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/exceptions/dataset.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/exceptions/software.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/exceptions/workflow.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/__init__.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/authentication.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/software.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/software_updates.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/topology.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/models/workflow.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/py.typed +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/authentication.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/dataset.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/software.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/software_updates.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/topology.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/services/workflow.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/__init__.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/authentication.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/helpers.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/software.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/software_updates.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/topology.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/testing/workflows.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/utils.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/zcrypto.py +0 -0
- {zosmfrestapi-0.2.0 → zosmfrestapi-0.2.1}/zosmfrestapi/zcrypto_client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zosmfrestapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A Python wrapper for the z/OSMF REST API
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -20,7 +20,7 @@ Requires-Dist: pendulum (>=3.2.0,<4.0.0)
|
|
|
20
20
|
Requires-Dist: py_zcrypto ; extra == "zcrypto"
|
|
21
21
|
Project-URL: Homepage, https://sr.ht/~ocurero/zosmfrestapi/
|
|
22
22
|
Project-URL: PyPI, https://pypi.org/project/zosmfrestapi/
|
|
23
|
-
Project-URL: Repository, https://sr.ht/~ocurero/zosmfrestapi
|
|
23
|
+
Project-URL: Repository, https://git.sr.ht/~ocurero/zosmfrestapi
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
26
26
|
# A Python wrapper for the z/OSMF© REST API
|
|
@@ -33,9 +33,9 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
|
|
34
34
|
* Open Source: MIT License.
|
|
35
35
|
* Website: <https://sr.ht/~ocurero/zosmfrestapi/>
|
|
36
|
-
*
|
|
37
|
-
* Changelog:
|
|
38
|
-
* Contributing:
|
|
36
|
+
* Repository: <https://git.sr.ht/~ocurero/zosmfrestapi>
|
|
37
|
+
* Changelog: <https://git.sr.ht/~ocurero/zosmfrestapi/tree/main/item/CHANGELOG.md>
|
|
38
|
+
* Contributing: <https://git.sr.ht/~ocurero/zosmfrestapi/tree/main/item/CONTRIBUTING.md>
|
|
39
39
|
|
|
40
40
|
Key features:
|
|
41
41
|
* **Pure Python**: Package and its dependencies are 100% pure Python (no C extensions required).
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
* Open Source: MIT License.
|
|
10
10
|
* Website: <https://sr.ht/~ocurero/zosmfrestapi/>
|
|
11
|
-
*
|
|
12
|
-
* Changelog:
|
|
13
|
-
* Contributing:
|
|
11
|
+
* Repository: <https://git.sr.ht/~ocurero/zosmfrestapi>
|
|
12
|
+
* Changelog: <https://git.sr.ht/~ocurero/zosmfrestapi/tree/main/item/CHANGELOG.md>
|
|
13
|
+
* Contributing: <https://git.sr.ht/~ocurero/zosmfrestapi/tree/main/item/CONTRIBUTING.md>
|
|
14
14
|
|
|
15
15
|
Key features:
|
|
16
16
|
* **Pure Python**: Package and its dependencies are 100% pure Python (no C extensions required).
|
|
@@ -1,97 +1,103 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "zosmfrestapi"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"
|
|
16
|
-
"Topic ::
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"pytest-
|
|
41
|
-
"pytest-
|
|
42
|
-
"
|
|
43
|
-
"flake8
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"--
|
|
65
|
-
"--cov=
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{ cmd = "
|
|
75
|
-
{ cmd = "
|
|
76
|
-
{ cmd = "
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{ cmd = "
|
|
85
|
-
{ cmd = "
|
|
86
|
-
{ cmd = "
|
|
87
|
-
{ cmd = "
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "zosmfrestapi"
|
|
3
|
+
description = "A Python wrapper for the z/OSMF REST API"
|
|
4
|
+
readme = "README.md"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Oscar Curero",email = "dev@curero.es"}
|
|
7
|
+
]
|
|
8
|
+
license = "MIT"
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
keywords = ["z/OSMF", "IBM Z", "mainframe", "REST API"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Operating System :: OS Independent",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3.12",
|
|
15
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
16
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
17
|
+
]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"httpx2 (>=2.12.0,<3.0.0)",
|
|
20
|
+
"pendulum (>=3.2.0,<4.0.0)",
|
|
21
|
+
"dacite (>=1.9.2,<2.0.0)",
|
|
22
|
+
]
|
|
23
|
+
dynamic = []
|
|
24
|
+
version = "0.2.1"
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://sr.ht/~ocurero/zosmfrestapi/"
|
|
28
|
+
Repository = "https://git.sr.ht/~ocurero/zosmfrestapi"
|
|
29
|
+
PyPI = "https://pypi.org/project/zosmfrestapi/"
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
zcrypto = [
|
|
33
|
+
"py_zcrypto",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = [
|
|
38
|
+
"pytest (>=9.1.1,<10.0.0)",
|
|
39
|
+
"black (>=26.5.1,<27.0.0)",
|
|
40
|
+
"pytest-recording (>=0.14.0,<0.15.0)",
|
|
41
|
+
"pytest-httpx2 (>=1.0.0,<2.0.0)",
|
|
42
|
+
"pytest-cov (>=7.1.0,<8.0.0)",
|
|
43
|
+
"flake8 (>=7.5.0,<8.0.0)",
|
|
44
|
+
"flake8-pyproject (>=1.2.4,<2.0.0)",
|
|
45
|
+
"mypy (>=2.4.1,<3.0.0)",
|
|
46
|
+
"poethepoet (>=0.49.0,<0.50.0)",
|
|
47
|
+
"pyright (>=1.1.414,<2.0.0)",
|
|
48
|
+
]
|
|
49
|
+
zcrypto-dev = [
|
|
50
|
+
"cryptography (>=50.0.2,<51.0.0)"
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.black]
|
|
54
|
+
line-length = 96
|
|
55
|
+
|
|
56
|
+
[tool.flake8]
|
|
57
|
+
max-line-length = 96
|
|
58
|
+
extend-ignore = ["E203", "W503"]
|
|
59
|
+
per-file-ignores = "tests/*.py:E501"
|
|
60
|
+
|
|
61
|
+
[tool.pytest.ini_options]
|
|
62
|
+
testpaths = ["tests"]
|
|
63
|
+
addopts = ["-ra",
|
|
64
|
+
"--record-mode=none",
|
|
65
|
+
"--cov-fail-under=100",
|
|
66
|
+
"--cov=zosmfrestapi",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
[tool.poe.tasks]
|
|
71
|
+
format = "black ."
|
|
72
|
+
|
|
73
|
+
lint = [
|
|
74
|
+
{ cmd = "black --check ." },
|
|
75
|
+
{ cmd = "flake8" },
|
|
76
|
+
{ cmd = "mypy zosmfrestapi" },
|
|
77
|
+
{ cmd = "pyright --warnings" }
|
|
78
|
+
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
test = "pytest"
|
|
82
|
+
|
|
83
|
+
check = [
|
|
84
|
+
{ cmd = "black --check ." },
|
|
85
|
+
{ cmd = "flake8 zosmfrestapi" },
|
|
86
|
+
{ cmd = "pyright --warnings" },
|
|
87
|
+
{ cmd = "mypy zosmfrestapi" },
|
|
88
|
+
{ cmd = "pytest" }
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[tool.mypy.overrides]]
|
|
92
|
+
module = ["OpenSSL.*", "py_zcrypto.*"]
|
|
93
|
+
ignore_missing_imports = true
|
|
94
|
+
|
|
95
|
+
[tool.poetry]
|
|
96
|
+
|
|
97
|
+
[tool.poetry-dynamic-versioning]
|
|
98
|
+
enable = false
|
|
99
|
+
|
|
100
|
+
[build-system]
|
|
101
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
|
|
102
|
+
build-backend = "poetry_dynamic_versioning.backend"
|
|
103
|
+
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import ssl
|
|
3
|
+
from importlib.metadata import version
|
|
3
4
|
from types import TracebackType
|
|
4
5
|
from typing import Literal, Self
|
|
5
6
|
|
|
6
7
|
import httpx2
|
|
7
8
|
from zosmfrestapi.exceptions import ZosmfAuthError, ZosmfError
|
|
8
9
|
|
|
10
|
+
__version__ = version("zosmfrestapi")
|
|
9
11
|
logger = logging.getLogger(__name__)
|
|
10
12
|
|
|
11
13
|
|
|
@@ -86,7 +88,7 @@ class ZosmfBase:
|
|
|
86
88
|
ctx.load_cert_chain(certfile=cert)
|
|
87
89
|
if cafile:
|
|
88
90
|
ctx.load_verify_locations(cafile=cafile)
|
|
89
|
-
verify = ctx
|
|
91
|
+
verify = ctx
|
|
90
92
|
|
|
91
93
|
proxy_config: str | httpx2.Proxy | None = proxy
|
|
92
94
|
if proxy:
|
|
@@ -95,13 +97,16 @@ class ZosmfBase:
|
|
|
95
97
|
(proxyusername, proxypassword) if proxyusername or proxypassword else None
|
|
96
98
|
)
|
|
97
99
|
auth = (username, password) if username and password else None
|
|
98
|
-
headers = {
|
|
100
|
+
headers = {
|
|
101
|
+
"X-CSRF-ZOSMF-HEADER": "zosmfrestapi",
|
|
102
|
+
"User-Agent": f"zosmfrestapi/{__version__}",
|
|
103
|
+
}
|
|
99
104
|
if ltpa_token:
|
|
100
|
-
headers
|
|
105
|
+
headers["Cookie"] = f"LtpaToken2={ltpa_token}"
|
|
101
106
|
if jwt_token:
|
|
102
|
-
headers
|
|
107
|
+
headers["Cookie"] = f"{jwt_cookie_name}={jwt_token}"
|
|
103
108
|
if ltpa_token and jwt_token:
|
|
104
|
-
headers
|
|
109
|
+
headers["Cookie"] = f"LtpaToken2={ltpa_token}; {jwt_cookie_name}={jwt_token}"
|
|
105
110
|
self.http = httpx2.Client(
|
|
106
111
|
base_url=server,
|
|
107
112
|
proxy=proxy_config,
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|