aas-http-client 1.2.2__tar.gz → 1.2.4__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.
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/PKG-INFO +2 -2
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/experimental_implementation.py +87 -1
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/PKG-INFO +2 -2
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/pyproject.toml +2 -2
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/LICENSE +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/README.md +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/__init__.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/Configuration/config_classes.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/aas_client.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/__init__.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/authentication.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/shell_implementation.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/sm_implementation.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/attachment.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/pagination.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/demo/demo_process.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/demo/logging_handler.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/__init__.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/encoder.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/http_helper.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/model_builder.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/sdk_tools.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/utilities/version_check.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/SOURCES.txt +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/dependency_links.txt +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/requires.txt +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/top_level.txt +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/setup.cfg +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/tests/test_client.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/tests/test_client_reg.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/tests/test_sdk_tools.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/tests/test_utils.py +0 -0
- {aas_http_client-1.2.2 → aas_http_client-1.2.4}/tests/test_wrapper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aas-http-client
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Flexible Python HTTP client for communication with various types of AAS servers.
|
|
5
5
|
Author-email: Daniel Klein <daniel.klein@em.ag>
|
|
6
6
|
License: MIT License
|
|
@@ -26,7 +26,7 @@ License: MIT License
|
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/fluid40/aas-http-client
|
|
29
|
-
Requires-Python: >=3.
|
|
29
|
+
Requires-Python: >=3.13
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
License-File: LICENSE
|
|
32
32
|
Requires-Dist: pydantic>=2.13.4
|
|
@@ -32,11 +32,97 @@ class ExperimentalImplementation(BaseModel):
|
|
|
32
32
|
session = client.get_session()
|
|
33
33
|
if session is None:
|
|
34
34
|
raise ValueError(
|
|
35
|
-
"HTTP session is not initialized in the client. Call 'initialize()' method of the client before creating
|
|
35
|
+
"HTTP session is not initialized in the client. Call 'initialize()' method of the client before creating ExperimentalImplementation instance."
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
self._session: requests.Session = session
|
|
39
39
|
|
|
40
|
+
# GET /concept-descriptions
|
|
41
|
+
def get_concept_descriptions(self):
|
|
42
|
+
"""Retrieves concept descriptions. Experimental feature - may not be supported by all servers."""
|
|
43
|
+
url = f"{self._client.base_url}/concept-descriptions"
|
|
44
|
+
|
|
45
|
+
self._client.set_token() # ensures Authorization header is set
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
response = self._session.get(url, timeout=self._client.time_out)
|
|
49
|
+
_logger.debug(f"Call REST API url '{response.url}'")
|
|
50
|
+
|
|
51
|
+
if response.status_code == STATUS_CODE_404:
|
|
52
|
+
_logger.warning("Concept descriptions not found.")
|
|
53
|
+
_logger.debug(response.text)
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
if response.status_code != STATUS_CODE_200:
|
|
57
|
+
log_response(response)
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
except requests.exceptions.RequestException as e:
|
|
61
|
+
_logger.error(f"Error calling REST API: {e}")
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
return response.json()
|
|
65
|
+
|
|
66
|
+
# GET /concept-descriptions/{conceptDescriptionIdentifier}
|
|
67
|
+
def get_concept_description_by_id(self, concept_description_identifier: str):
|
|
68
|
+
"""Retrieves a specific concept description by its identifier. Experimental feature - may not be supported by all servers.
|
|
69
|
+
|
|
70
|
+
:param concept_description_identifier: The unique identifier of the concept description
|
|
71
|
+
:return: Concept description data as a dictionary or None if not found
|
|
72
|
+
"""
|
|
73
|
+
url = f"{self._client.base_url}/concept-descriptions/{concept_description_identifier}"
|
|
74
|
+
|
|
75
|
+
self._client.set_token() # ensures Authorization header is set
|
|
76
|
+
|
|
77
|
+
try:
|
|
78
|
+
response = self._session.get(url, timeout=self._client.time_out)
|
|
79
|
+
_logger.debug(f"Call REST API url '{response.url}'")
|
|
80
|
+
|
|
81
|
+
if response.status_code == STATUS_CODE_404:
|
|
82
|
+
_logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
83
|
+
_logger.debug(response.text)
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if response.status_code != STATUS_CODE_200:
|
|
87
|
+
log_response(response)
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
except requests.exceptions.RequestException as e:
|
|
91
|
+
_logger.error(f"Error calling REST API: {e}")
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
return response.json()
|
|
95
|
+
|
|
96
|
+
# POST /concept-descriptions
|
|
97
|
+
def post_concept_description(self, concept_description: dict) -> bool:
|
|
98
|
+
"""Creates a new concept description. Experimental feature - may not be supported by all servers.
|
|
99
|
+
|
|
100
|
+
:param concept_description: Concept description data as a dictionary
|
|
101
|
+
:return: True if creation was successful, False otherwise
|
|
102
|
+
"""
|
|
103
|
+
url = f"{self._client.base_url}/concept-descriptions"
|
|
104
|
+
|
|
105
|
+
self._client.set_token() # ensures Authorization header is set
|
|
106
|
+
|
|
107
|
+
try:
|
|
108
|
+
response = self._session.post(url, json=concept_description, timeout=self._client.time_out)
|
|
109
|
+
_logger.debug(f"Call REST API url '{response.url}'")
|
|
110
|
+
|
|
111
|
+
if response.status_code == STATUS_CODE_404:
|
|
112
|
+
_logger.warning("Concept descriptions endpoint not found.")
|
|
113
|
+
_logger.debug(response.text)
|
|
114
|
+
return False
|
|
115
|
+
|
|
116
|
+
if response.status_code != STATUS_CODE_200:
|
|
117
|
+
log_response(response)
|
|
118
|
+
return False
|
|
119
|
+
|
|
120
|
+
except requests.exceptions.RequestException as e:
|
|
121
|
+
_logger.error(f"Error calling REST API: {e}")
|
|
122
|
+
return False
|
|
123
|
+
|
|
124
|
+
return True
|
|
125
|
+
|
|
40
126
|
# GET /submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/attachment
|
|
41
127
|
def get_file_by_path_submodel_repo(self, submodel_identifier: str, id_short_path: str) -> bytes | None:
|
|
42
128
|
"""Downloads file content from a specific submodel element from the Submodel at a specified path. Experimental feature - may not be supported by all servers.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aas-http-client
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Flexible Python HTTP client for communication with various types of AAS servers.
|
|
5
5
|
Author-email: Daniel Klein <daniel.klein@em.ag>
|
|
6
6
|
License: MIT License
|
|
@@ -26,7 +26,7 @@ License: MIT License
|
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/fluid40/aas-http-client
|
|
29
|
-
Requires-Python: >=3.
|
|
29
|
+
Requires-Python: >=3.13
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
License-File: LICENSE
|
|
32
32
|
Requires-Dist: pydantic>=2.13.4
|
|
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aas-http-client"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
8
8
|
description = "Flexible Python HTTP client for communication with various types of AAS servers."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
11
11
|
authors = [{ name = "Daniel Klein", email = "daniel.klein@em.ag" }]
|
|
12
|
-
requires-python = ">=3.
|
|
12
|
+
requires-python = ">=3.13"
|
|
13
13
|
dependencies = [
|
|
14
14
|
"pydantic>=2.13.4",
|
|
15
15
|
"requests>=2.34.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/client/aas_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/attachment.py
RENAMED
|
File without changes
|
{aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/pagination.py
RENAMED
|
File without changes
|
{aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client/classes/wrapper/sdk_wrapper.py
RENAMED
|
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
|
{aas_http_client-1.2.2 → aas_http_client-1.2.4}/aas_http_client.egg-info/dependency_links.txt
RENAMED
|
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
|