aas-http-client 1.2.4__tar.gz → 1.2.5__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.4 → aas_http_client-1.2.5}/PKG-INFO +1 -1
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/experimental_implementation.py +32 -1
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client.egg-info/PKG-INFO +1 -1
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/pyproject.toml +1 -1
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/LICENSE +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/README.md +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/__init__.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/Configuration/config_classes.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/aas_client.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/__init__.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/authentication.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/shell_implementation.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/sm_implementation.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/wrapper/attachment.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/wrapper/pagination.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/demo/demo_process.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/demo/logging_handler.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/__init__.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/encoder.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/http_helper.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/model_builder.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/sdk_tools.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/utilities/version_check.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client.egg-info/SOURCES.txt +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client.egg-info/dependency_links.txt +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client.egg-info/requires.txt +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client.egg-info/top_level.txt +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/setup.cfg +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/tests/test_client.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/tests/test_client_reg.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/tests/test_sdk_tools.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/tests/test_utils.py +0 -0
- {aas_http_client-1.2.4 → aas_http_client-1.2.5}/tests/test_wrapper.py +0 -0
|
@@ -14,6 +14,7 @@ from pydantic import BaseModel
|
|
|
14
14
|
from aas_http_client.utilities.encoder import encode_base_64
|
|
15
15
|
from aas_http_client.utilities.http_helper import (
|
|
16
16
|
STATUS_CODE_200,
|
|
17
|
+
STATUS_CODE_201,
|
|
17
18
|
STATUS_CODE_204,
|
|
18
19
|
STATUS_CODE_404,
|
|
19
20
|
log_response,
|
|
@@ -113,7 +114,37 @@ class ExperimentalImplementation(BaseModel):
|
|
|
113
114
|
_logger.debug(response.text)
|
|
114
115
|
return False
|
|
115
116
|
|
|
116
|
-
if response.status_code !=
|
|
117
|
+
if response.status_code != STATUS_CODE_201:
|
|
118
|
+
log_response(response)
|
|
119
|
+
return False
|
|
120
|
+
|
|
121
|
+
except requests.exceptions.RequestException as e:
|
|
122
|
+
_logger.error(f"Error calling REST API: {e}")
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
return True
|
|
126
|
+
|
|
127
|
+
# DELETE /concept-descriptions/{conceptDescriptionIdentifier}
|
|
128
|
+
def delete_concept_description_by_id(self, concept_description_identifier: str) -> bool:
|
|
129
|
+
"""Deletes a specific concept description by its identifier. Experimental feature - may not be supported by all servers.
|
|
130
|
+
|
|
131
|
+
:param concept_description_identifier: The unique identifier of the concept description
|
|
132
|
+
:return: True if deletion was successful, False otherwise
|
|
133
|
+
"""
|
|
134
|
+
url = f"{self._client.base_url}/concept-descriptions/{concept_description_identifier}"
|
|
135
|
+
|
|
136
|
+
self._client.set_token() # ensures Authorization header is set
|
|
137
|
+
|
|
138
|
+
try:
|
|
139
|
+
response = self._session.delete(url, timeout=self._client.time_out)
|
|
140
|
+
_logger.debug(f"Call REST API url '{response.url}'")
|
|
141
|
+
|
|
142
|
+
if response.status_code == STATUS_CODE_404:
|
|
143
|
+
_logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
144
|
+
_logger.debug(response.text)
|
|
145
|
+
return False
|
|
146
|
+
|
|
147
|
+
if response.status_code != STATUS_CODE_204:
|
|
117
148
|
log_response(response)
|
|
118
149
|
return False
|
|
119
150
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aas-http-client"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.5"
|
|
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" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.2.4 → aas_http_client-1.2.5}/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.4 → aas_http_client-1.2.5}/aas_http_client/classes/wrapper/attachment.py
RENAMED
|
File without changes
|
{aas_http_client-1.2.4 → aas_http_client-1.2.5}/aas_http_client/classes/wrapper/pagination.py
RENAMED
|
File without changes
|
{aas_http_client-1.2.4 → aas_http_client-1.2.5}/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.4 → aas_http_client-1.2.5}/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
|