aas-http-client 1.3.4__tar.gz → 1.3.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.3.4 → aas_http_client-1.3.5}/PKG-INFO +1 -1
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/experimental_implementation.py +31 -13
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client.egg-info/PKG-INFO +1 -1
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/pyproject.toml +1 -1
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/LICENSE +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/README.md +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/__init__.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/Configuration/config_classes.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/aas_client.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/__init__.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/authentication.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/shell_implementation.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/sm_implementation.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/wrapper/attachment.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/wrapper/pagination.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/demo/demo_process.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/demo/logging_handler.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/__init__.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/constants.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/encoder.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/http_helper.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/model_builder.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/sdk_tools.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/utilities/version_check.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client.egg-info/SOURCES.txt +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client.egg-info/dependency_links.txt +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client.egg-info/requires.txt +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client.egg-info/top_level.txt +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/setup.cfg +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/tests/test_client.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/tests/test_client_reg.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/tests/test_sdk_tools.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/tests/test_utils.py +0 -0
- {aas_http_client-1.3.4 → aas_http_client-1.3.5}/tests/test_wrapper.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Experimental implementation of Asset Administration Shell Registry related API calls."""
|
|
2
2
|
|
|
3
|
+
import json
|
|
3
4
|
import logging
|
|
4
5
|
import mimetypes
|
|
5
6
|
from pathlib import Path
|
|
@@ -41,33 +42,50 @@ class ExperimentalImplementation(BaseModel):
|
|
|
41
42
|
self._session: requests.Session = session
|
|
42
43
|
|
|
43
44
|
# GET /concept-descriptions
|
|
44
|
-
def get_concept_descriptions(
|
|
45
|
-
"""
|
|
45
|
+
def get_concept_descriptions(
|
|
46
|
+
self, id_short: str = "", is_case_of: str = "", data_specification_ref: str = "", limit: int = 100, cursor: str = ""
|
|
47
|
+
):
|
|
48
|
+
"""Retrieves concept descriptions. Experimental feature - may not be supported by all servers.
|
|
49
|
+
|
|
50
|
+
:param id_short: Filter by idShort
|
|
51
|
+
:param is_case_of: Filter by isCaseOf
|
|
52
|
+
:param data_specification_ref: Filter by dataSpecificationRef
|
|
53
|
+
:param limit: Maximum number of results to return
|
|
54
|
+
:param cursor: Cursor for pagination
|
|
55
|
+
:return: List of concept descriptions as dictionaries or None if an error occurs
|
|
56
|
+
"""
|
|
46
57
|
url = f"{self._client.base_url}/concept-descriptions"
|
|
47
58
|
|
|
59
|
+
# Build query parameters
|
|
60
|
+
|
|
61
|
+
params: dict[str, Any] = {}
|
|
62
|
+
if id_short:
|
|
63
|
+
params["idShort"] = id_short
|
|
64
|
+
if is_case_of:
|
|
65
|
+
params["isCaseOf"] = is_case_of
|
|
66
|
+
if data_specification_ref:
|
|
67
|
+
params["dataSpecificationRef"] = data_specification_ref
|
|
68
|
+
if limit:
|
|
69
|
+
params["limit"] = str(limit)
|
|
70
|
+
if cursor:
|
|
71
|
+
params["cursor"] = cursor
|
|
72
|
+
|
|
48
73
|
self._client.set_token() # ensures Authorization header is set
|
|
49
74
|
|
|
50
75
|
try:
|
|
51
|
-
response = self._session.get(url, timeout=self._client.time_out)
|
|
76
|
+
response = self._session.get(url, timeout=self._client.time_out, params=params)
|
|
52
77
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
53
78
|
|
|
54
|
-
if response.status_code == STATUS_CODE_404:
|
|
55
|
-
if self._client.get_log_intensity() == LogIntensity.HIGH:
|
|
56
|
-
_logger.warning("Concept descriptions not found.")
|
|
57
|
-
elif self._client.get_log_intensity() == LogIntensity.STANDARD:
|
|
58
|
-
_logger.debug("Concept descriptions not found.")
|
|
59
|
-
|
|
60
|
-
return None
|
|
61
|
-
|
|
62
79
|
if response.status_code != STATUS_CODE_200:
|
|
63
80
|
log_response(response)
|
|
64
81
|
return None
|
|
65
82
|
|
|
66
83
|
except requests.exceptions.RequestException as e:
|
|
67
|
-
_logger.error(f"Error
|
|
84
|
+
_logger.error(f"Error call REST API: {e}")
|
|
68
85
|
return None
|
|
69
86
|
|
|
70
|
-
|
|
87
|
+
content = response.content.decode("utf-8")
|
|
88
|
+
return json.loads(content)
|
|
71
89
|
|
|
72
90
|
# GET /concept-descriptions/{conceptDescriptionIdentifier}
|
|
73
91
|
def get_concept_description_by_id(self, concept_description_identifier: str):
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aas-http-client"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.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.3.4 → aas_http_client-1.3.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.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/wrapper/attachment.py
RENAMED
|
File without changes
|
{aas_http_client-1.3.4 → aas_http_client-1.3.5}/aas_http_client/classes/wrapper/pagination.py
RENAMED
|
File without changes
|
{aas_http_client-1.3.4 → aas_http_client-1.3.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
|
|
File without changes
|
{aas_http_client-1.3.4 → aas_http_client-1.3.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
|