aas-http-client 1.2.7__tar.gz → 1.2.9__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.
Files changed (38) hide show
  1. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/PKG-INFO +4 -5
  2. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/aas_client.py +1 -1
  3. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/experimental_implementation.py +16 -16
  4. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/shell_implementation.py +24 -24
  5. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +41 -8
  6. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/sm_implementation.py +61 -12
  7. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +16 -3
  8. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/wrapper/pagination.py +21 -21
  9. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/constants.py +2 -2
  10. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/model_builder.py +59 -0
  11. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client.egg-info/PKG-INFO +4 -5
  12. aas_http_client-1.2.9/aas_http_client.egg-info/requires.txt +4 -0
  13. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/pyproject.toml +4 -5
  14. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/tests/test_wrapper.py +24 -24
  15. aas_http_client-1.2.7/aas_http_client.egg-info/requires.txt +0 -5
  16. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/LICENSE +0 -0
  17. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/README.md +0 -0
  18. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/__init__.py +0 -0
  19. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/Configuration/config_classes.py +0 -0
  20. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/__init__.py +0 -0
  21. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/client/implementations/authentication.py +0 -0
  22. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/wrapper/attachment.py +0 -0
  23. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
  24. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/demo/demo_process.py +0 -0
  25. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/demo/logging_handler.py +0 -0
  26. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/__init__.py +0 -0
  27. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/encoder.py +0 -0
  28. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/http_helper.py +0 -0
  29. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/sdk_tools.py +0 -0
  30. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client/utilities/version_check.py +0 -0
  31. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client.egg-info/SOURCES.txt +0 -0
  32. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client.egg-info/dependency_links.txt +0 -0
  33. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/aas_http_client.egg-info/top_level.txt +0 -0
  34. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/setup.cfg +0 -0
  35. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/tests/test_client.py +0 -0
  36. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/tests/test_client_reg.py +0 -0
  37. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/tests/test_sdk_tools.py +0 -0
  38. {aas_http_client-1.2.7 → aas_http_client-1.2.9}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aas-http-client
3
- Version: 1.2.7
3
+ Version: 1.2.9
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
@@ -29,11 +29,10 @@ Project-URL: Homepage, https://github.com/fluid40/aas-http-client
29
29
  Requires-Python: >=3.13
30
30
  Description-Content-Type: text/markdown
31
31
  License-File: LICENSE
32
- Requires-Dist: pydantic>=2.13.4
32
+ Requires-Dist: pydantic>=2.13.5
33
33
  Requires-Dist: requests>=2.34.2
34
- Requires-Dist: basyx-python-sdk>=2.0.1
35
- Requires-Dist: puremagic==1.30
36
- Requires-Dist: types-requests>=2.33.0.20260518
34
+ Requires-Dist: basyx-python-sdk==2.1.0
35
+ Requires-Dist: puremagic==2.2.0
37
36
  Dynamic: license-file
38
37
 
39
38
  # AAS HTTP Client
@@ -76,7 +76,7 @@ class AasHttpClient(BaseModel):
76
76
  experimental: ExperimentalImplementation | None = Field(default=None)
77
77
  submodel_registry: SubmodelRegistryImplementation | None = Field(default=None)
78
78
  _cached_token: TokenData | None = PrivateAttr(default=None)
79
- _log_intensity: LogIntensity = PrivateAttr(default=LogIntensity.High)
79
+ _log_intensity: LogIntensity = PrivateAttr(default=LogIntensity.HIGH)
80
80
 
81
81
  def initialize(self):
82
82
  """Initialize the AasHttpClient with the given URL, username and password."""
@@ -52,9 +52,9 @@ class ExperimentalImplementation(BaseModel):
52
52
  _logger.debug(f"Call REST API url '{response.url}'")
53
53
 
54
54
  if response.status_code == STATUS_CODE_404:
55
- if self._client.get_log_intensity() == LogIntensity.High:
55
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
56
56
  _logger.warning("Concept descriptions not found.")
57
- elif self._client.get_log_intensity() == LogIntensity.Standard:
57
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
58
58
  _logger.debug("Concept descriptions not found.")
59
59
 
60
60
  _logger.debug(response.text)
@@ -86,9 +86,9 @@ class ExperimentalImplementation(BaseModel):
86
86
  _logger.debug(f"Call REST API url '{response.url}'")
87
87
 
88
88
  if response.status_code == STATUS_CODE_404:
89
- if self._client.get_log_intensity() == LogIntensity.High:
89
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
90
90
  _logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
91
- elif self._client.get_log_intensity() == LogIntensity.Standard:
91
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
92
92
  _logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
93
93
 
94
94
  _logger.debug(response.text)
@@ -120,9 +120,9 @@ class ExperimentalImplementation(BaseModel):
120
120
  _logger.debug(f"Call REST API url '{response.url}'")
121
121
 
122
122
  if response.status_code == STATUS_CODE_404:
123
- if self._client.get_log_intensity() == LogIntensity.High:
123
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
124
124
  _logger.warning("Concept descriptions endpoint not found.")
125
- elif self._client.get_log_intensity() == LogIntensity.Standard:
125
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
126
126
  _logger.debug("Concept descriptions endpoint not found.")
127
127
 
128
128
  _logger.debug(response.text)
@@ -154,9 +154,9 @@ class ExperimentalImplementation(BaseModel):
154
154
  _logger.debug(f"Call REST API url '{response.url}'")
155
155
 
156
156
  if response.status_code == STATUS_CODE_404:
157
- if self._client.get_log_intensity() == LogIntensity.High:
157
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
158
158
  _logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
159
- elif self._client.get_log_intensity() == LogIntensity.Standard:
159
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
160
160
  _logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
161
161
 
162
162
  _logger.debug(response.text)
@@ -192,11 +192,11 @@ class ExperimentalImplementation(BaseModel):
192
192
  _logger.debug(f"Call REST API url '{response.url}'")
193
193
 
194
194
  if response.status_code == STATUS_CODE_404:
195
- if self._client.get_log_intensity() == LogIntensity.High:
195
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
196
196
  _logger.warning(
197
197
  f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
198
198
  )
199
- elif self._client.get_log_intensity() == LogIntensity.Standard:
199
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
200
200
  _logger.debug(
201
201
  f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
202
202
  )
@@ -244,9 +244,9 @@ class ExperimentalImplementation(BaseModel):
244
244
  _logger.debug(f"Call REST API url '{response.url}'")
245
245
 
246
246
  if response.status_code == STATUS_CODE_404:
247
- if self._client.get_log_intensity() == LogIntensity.High:
247
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
248
248
  _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
249
- elif self._client.get_log_intensity() == LogIntensity.Standard:
249
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
250
250
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
251
251
 
252
252
  _logger.debug(response.text)
@@ -293,9 +293,9 @@ class ExperimentalImplementation(BaseModel):
293
293
  _logger.debug(f"Call REST API url '{response.url}'")
294
294
 
295
295
  if response.status_code == STATUS_CODE_404:
296
- if self._client.get_log_intensity() == LogIntensity.High:
296
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
297
297
  _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
298
- elif self._client.get_log_intensity() == LogIntensity.Standard:
298
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
299
299
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
300
300
 
301
301
  _logger.debug(response.text)
@@ -332,9 +332,9 @@ class ExperimentalImplementation(BaseModel):
332
332
  _logger.debug(f"Call REST API url '{response.url}'")
333
333
 
334
334
  if response.status_code == 404:
335
- if self._client.get_log_intensity() == LogIntensity.High:
335
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
336
336
  _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
337
- elif self._client.get_log_intensity() == LogIntensity.Standard:
337
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
338
338
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
339
339
 
340
340
  return False
@@ -59,9 +59,9 @@ class ShellRepoImplementation(BaseModel):
59
59
  _logger.debug(f"Call REST API url '{response.url}'")
60
60
 
61
61
  if response.status_code == STATUS_CODE_404:
62
- if self._client.get_log_intensity() == LogIntensity.High:
62
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
63
63
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
64
- elif self._client.get_log_intensity() == LogIntensity.Standard:
64
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
65
65
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
66
66
 
67
67
  _logger.debug(response.text)
@@ -98,9 +98,9 @@ class ShellRepoImplementation(BaseModel):
98
98
  _logger.debug(f"Call REST API url '{response.url}'")
99
99
 
100
100
  if response.status_code == STATUS_CODE_404: #
101
- if self._client.get_log_intensity() == LogIntensity.High:
101
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
102
102
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
103
- elif self._client.get_log_intensity() == LogIntensity.Standard:
103
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
104
104
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
105
105
 
106
106
  _logger.debug(response.text)
@@ -135,9 +135,9 @@ class ShellRepoImplementation(BaseModel):
135
135
  _logger.debug(f"Call REST API url '{response.url}'")
136
136
 
137
137
  if response.status_code == STATUS_CODE_404:
138
- if self._client.get_log_intensity() == LogIntensity.High:
138
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
139
139
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
140
- elif self._client.get_log_intensity() == LogIntensity.Standard:
140
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
141
141
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
142
142
 
143
143
  _logger.debug(response.text)
@@ -172,9 +172,9 @@ class ShellRepoImplementation(BaseModel):
172
172
  _logger.debug(f"Call REST API url '{response.url}'")
173
173
 
174
174
  if response.status_code == STATUS_CODE_404:
175
- if self._client.get_log_intensity() == LogIntensity.High:
175
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
176
176
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
177
- elif self._client.get_log_intensity() == LogIntensity.Standard:
177
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
178
178
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
179
179
 
180
180
  _logger.debug(response.text)
@@ -241,9 +241,9 @@ class ShellRepoImplementation(BaseModel):
241
241
  _logger.debug(f"Call REST API url '{response.url}'")
242
242
 
243
243
  if response.status_code == STATUS_CODE_404:
244
- if self._client.get_log_intensity() == LogIntensity.High:
244
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
245
245
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
246
- elif self._client.get_log_intensity() == LogIntensity.Standard:
246
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
247
247
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
248
248
 
249
249
  _logger.debug(response.text)
@@ -279,9 +279,9 @@ class ShellRepoImplementation(BaseModel):
279
279
  _logger.debug(f"Call REST API url '{response.url}'")
280
280
 
281
281
  if response.status_code == STATUS_CODE_404:
282
- if self._client.get_log_intensity() == LogIntensity.High:
282
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
283
283
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
284
- elif self._client.get_log_intensity() == LogIntensity.Standard:
284
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
285
285
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
286
286
 
287
287
  _logger.debug(response.text)
@@ -395,9 +395,9 @@ class ShellRepoImplementation(BaseModel):
395
395
  _logger.debug(f"Call REST API url '{response.url}'")
396
396
 
397
397
  if response.status_code == STATUS_CODE_404:
398
- if self._client.get_log_intensity() == LogIntensity.High:
398
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
399
399
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
400
- elif self._client.get_log_intensity() == LogIntensity.Standard:
400
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
401
401
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
402
402
 
403
403
  _logger.debug(response.text)
@@ -434,9 +434,9 @@ class ShellRepoImplementation(BaseModel):
434
434
  _logger.debug(f"Call REST API url '{response.url}'")
435
435
 
436
436
  if response.status_code == STATUS_CODE_404:
437
- if self._client.get_log_intensity() == LogIntensity.High:
437
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
438
438
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
439
- elif self._client.get_log_intensity() == LogIntensity.Standard:
439
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
440
440
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
441
441
 
442
442
  _logger.debug(response.text)
@@ -474,9 +474,9 @@ class ShellRepoImplementation(BaseModel):
474
474
  _logger.debug(f"Call REST API url '{response.url}'")
475
475
 
476
476
  if response.status_code == STATUS_CODE_404:
477
- if self._client.get_log_intensity() == LogIntensity.High:
477
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
478
478
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
479
- elif self._client.get_log_intensity() == LogIntensity.Standard:
479
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
480
480
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
481
481
 
482
482
  _logger.debug(response.text)
@@ -516,9 +516,9 @@ class ShellRepoImplementation(BaseModel):
516
516
  _logger.debug(f"Call REST API url '{response.url}'")
517
517
 
518
518
  if response.status_code == STATUS_CODE_404:
519
- if self._client.get_log_intensity() == LogIntensity.High:
519
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
520
520
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
521
- elif self._client.get_log_intensity() == LogIntensity.Standard:
521
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
522
522
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
523
523
 
524
524
  _logger.debug(response.text)
@@ -553,9 +553,9 @@ class ShellRepoImplementation(BaseModel):
553
553
  _logger.debug(f"Call REST API url '{response.url}'")
554
554
 
555
555
  if response.status_code == STATUS_CODE_404:
556
- if self._client.get_log_intensity() == LogIntensity.High:
556
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
557
557
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
558
- elif self._client.get_log_intensity() == LogIntensity.Standard:
558
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
559
559
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
560
560
 
561
561
  _logger.debug(response.text)
@@ -593,9 +593,9 @@ class ShellRepoImplementation(BaseModel):
593
593
  _logger.debug(f"Call REST API url '{response.url}'")
594
594
 
595
595
  if response.status_code == STATUS_CODE_404:
596
- if self._client.get_log_intensity() == LogIntensity.High:
596
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
597
597
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
598
- elif self._client.get_log_intensity() == LogIntensity.Standard:
598
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
599
599
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
600
600
 
601
601
  _logger.debug(response.text)
@@ -10,6 +10,7 @@ from pydantic import BaseModel
10
10
  if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
+ from aas_http_client.utilities.constants import LogIntensity
13
14
  from aas_http_client.utilities.encoder import encode_base_64
14
15
  from aas_http_client.utilities.http_helper import (
15
16
  STATUS_CODE_200,
@@ -56,7 +57,11 @@ class ShellRegistryImplementation(BaseModel):
56
57
  _logger.debug(f"Call REST API url '{response.url}'")
57
58
 
58
59
  if response.status_code == STATUS_CODE_404:
59
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
60
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
61
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
62
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
63
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
64
+
60
65
  _logger.debug(response.text)
61
66
  return None
62
67
 
@@ -91,7 +96,11 @@ class ShellRegistryImplementation(BaseModel):
91
96
  _logger.debug(f"Call REST API url '{response.url}'")
92
97
 
93
98
  if response.status_code == STATUS_CODE_404:
94
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
99
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
100
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
101
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
102
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
103
+
95
104
  _logger.debug(response.text)
96
105
  return False
97
106
 
@@ -124,7 +133,11 @@ class ShellRegistryImplementation(BaseModel):
124
133
  _logger.debug(f"Call REST API url '{response.url}'")
125
134
 
126
135
  if response.status_code == STATUS_CODE_404:
127
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
136
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
137
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
138
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
139
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
140
+
128
141
  _logger.debug(response.text)
129
142
  return False
130
143
 
@@ -159,7 +172,11 @@ class ShellRegistryImplementation(BaseModel):
159
172
  _logger.debug(f"Call REST API url '{response.url}'")
160
173
 
161
174
  if response.status_code == STATUS_CODE_404:
162
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
175
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
176
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
177
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
178
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
179
+
163
180
  _logger.debug(response.text)
164
181
  return None
165
182
 
@@ -196,7 +213,11 @@ class ShellRegistryImplementation(BaseModel):
196
213
  _logger.debug(f"Call REST API url '{response.url}'")
197
214
 
198
215
  if response.status_code == STATUS_CODE_404:
199
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
216
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
217
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
218
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
219
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
220
+
200
221
  _logger.debug(response.text)
201
222
  return False
202
223
 
@@ -231,7 +252,11 @@ class ShellRegistryImplementation(BaseModel):
231
252
  _logger.debug(f"Call REST API url '{response.url}'")
232
253
 
233
254
  if response.status_code == STATUS_CODE_404:
234
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
255
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
256
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
257
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
258
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
259
+
235
260
  _logger.debug(response.text)
236
261
  return False
237
262
 
@@ -355,7 +380,11 @@ class ShellRegistryImplementation(BaseModel):
355
380
  _logger.debug(f"Call REST API url '{response.url}'")
356
381
 
357
382
  if response.status_code == STATUS_CODE_404:
358
- _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
383
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
384
+ _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
385
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
386
+ _logger.debug(f"Shell Descriptor with id '{aas_identifier}' not found.")
387
+
359
388
  _logger.debug(response.text)
360
389
  return None
361
390
 
@@ -390,7 +419,11 @@ class ShellRegistryImplementation(BaseModel):
390
419
  _logger.debug(f"Call REST API url '{response.url}'")
391
420
 
392
421
  if response.status_code == STATUS_CODE_404:
393
- _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
422
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
423
+ _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
424
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
425
+ _logger.debug(f"Shell Descriptor with id '{aas_identifier}' not found.")
426
+
394
427
  _logger.debug(response.text)
395
428
  return None
396
429
 
@@ -10,6 +10,7 @@ from pydantic import BaseModel
10
10
  if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
+ from aas_http_client.utilities.constants import LogIntensity
13
14
  from aas_http_client.utilities.encoder import encode_base_64
14
15
  from aas_http_client.utilities.http_helper import (
15
16
  STATUS_CODE_200,
@@ -64,7 +65,11 @@ class SubmodelRepoImplementation(BaseModel):
64
65
  _logger.debug(f"Call REST API url '{response.url}'")
65
66
 
66
67
  if response.status_code == STATUS_CODE_404:
67
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
68
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
69
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
70
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
71
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
72
+
68
73
  _logger.debug(response.text)
69
74
  return None
70
75
 
@@ -99,7 +104,11 @@ class SubmodelRepoImplementation(BaseModel):
99
104
  _logger.debug(f"Call REST API url '{response.url}'")
100
105
 
101
106
  if response.status_code == STATUS_CODE_404:
102
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
107
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
108
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
109
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
110
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
111
+
103
112
  _logger.debug(response.text)
104
113
  return False
105
114
 
@@ -132,7 +141,11 @@ class SubmodelRepoImplementation(BaseModel):
132
141
  _logger.debug(f"Call REST API url '{response.url}'")
133
142
 
134
143
  if response.status_code == STATUS_CODE_404:
135
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
144
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
145
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
146
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
147
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
148
+
136
149
  _logger.debug(response.text)
137
150
  return False
138
151
 
@@ -176,7 +189,11 @@ class SubmodelRepoImplementation(BaseModel):
176
189
  _logger.debug(f"Call REST API url '{response.url}'")
177
190
 
178
191
  if response.status_code == STATUS_CODE_404:
179
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
192
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
193
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
194
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
195
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
196
+
180
197
  _logger.debug(response.text)
181
198
  return None
182
199
 
@@ -217,7 +234,11 @@ class SubmodelRepoImplementation(BaseModel):
217
234
  _logger.debug(f"Call REST API url '{response.url}'")
218
235
 
219
236
  if response.status_code == STATUS_CODE_404:
220
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
237
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
238
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
239
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
240
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
241
+
221
242
  _logger.debug(response.text)
222
243
  return False
223
244
 
@@ -262,7 +283,11 @@ class SubmodelRepoImplementation(BaseModel):
262
283
  _logger.debug(f"Call REST API url '{response.url}'")
263
284
 
264
285
  if response.status_code == STATUS_CODE_404:
265
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
286
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
287
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
288
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
289
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
290
+
266
291
  _logger.debug(response.text)
267
292
  return None
268
293
 
@@ -296,7 +321,11 @@ class SubmodelRepoImplementation(BaseModel):
296
321
  _logger.debug(f"Call REST API url '{response.url}'")
297
322
 
298
323
  if response.status_code == STATUS_CODE_404:
299
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
324
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
325
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
326
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
327
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
328
+
300
329
  _logger.debug(response.text)
301
330
  return False
302
331
 
@@ -548,7 +577,11 @@ class SubmodelRepoImplementation(BaseModel):
548
577
  _logger.debug(f"Call REST API url '{response.url}'")
549
578
 
550
579
  if response.status_code == STATUS_CODE_404:
551
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
580
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
581
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
582
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
583
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
584
+
552
585
  _logger.debug(response.text)
553
586
  return False
554
587
 
@@ -589,7 +622,11 @@ class SubmodelRepoImplementation(BaseModel):
589
622
  _logger.debug(f"Call REST API url '{response.url}'")
590
623
 
591
624
  if response.status_code == STATUS_CODE_404:
592
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
625
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
626
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
627
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
628
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
629
+
593
630
  _logger.debug(response.text)
594
631
  return None
595
632
 
@@ -629,7 +666,11 @@ class SubmodelRepoImplementation(BaseModel):
629
666
  _logger.debug(f"Call REST API url '{response.url}'")
630
667
 
631
668
  if response.status_code == STATUS_CODE_404:
632
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
669
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
670
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
671
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
672
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
673
+
633
674
  _logger.debug(response.text)
634
675
  return False
635
676
 
@@ -667,7 +708,11 @@ class SubmodelRepoImplementation(BaseModel):
667
708
  _logger.debug(f"Call REST API url '{response.url}'")
668
709
 
669
710
  if response.status_code == STATUS_CODE_404:
670
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
711
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
712
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
713
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
714
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
715
+
671
716
  _logger.debug(response.text)
672
717
  return None
673
718
 
@@ -703,7 +748,11 @@ class SubmodelRepoImplementation(BaseModel):
703
748
  _logger.debug(f"Call REST API url '{response.url}'")
704
749
 
705
750
  if response.status_code == STATUS_CODE_404:
706
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
751
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
752
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
753
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
754
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
755
+
707
756
  _logger.debug(response.text)
708
757
  return False
709
758
 
@@ -11,6 +11,7 @@ if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
13
 
14
+ from aas_http_client.utilities.constants import LogIntensity
14
15
  from aas_http_client.utilities.encoder import encode_base_64
15
16
  from aas_http_client.utilities.http_helper import (
16
17
  STATUS_CODE_200,
@@ -57,7 +58,11 @@ class SubmodelRegistryImplementation(BaseModel):
57
58
  _logger.debug(f"Call REST API url '{response.url}'")
58
59
 
59
60
  if response.status_code == STATUS_CODE_404:
60
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
61
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
62
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
63
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
64
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
65
+
61
66
  _logger.debug(response.text)
62
67
  return None
63
68
 
@@ -92,7 +97,11 @@ class SubmodelRegistryImplementation(BaseModel):
92
97
  _logger.debug(f"Call REST API url '{response.url}'")
93
98
 
94
99
  if response.status_code == STATUS_CODE_404:
95
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
100
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
101
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
102
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
103
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
104
+
96
105
  _logger.debug(response.text)
97
106
  return False
98
107
 
@@ -125,7 +134,11 @@ class SubmodelRegistryImplementation(BaseModel):
125
134
  _logger.debug(f"Call REST API url '{response.url}'")
126
135
 
127
136
  if response.status_code == STATUS_CODE_404:
128
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
137
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
138
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
139
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
140
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
141
+
129
142
  _logger.debug(response.text)
130
143
  return False
131
144
 
@@ -26,39 +26,39 @@ class ShellPaginatedData:
26
26
  """Class representing paginated data for Asset Administration Shells."""
27
27
 
28
28
  paging_metadata: PagingMetadata
29
- results: list[model.AssetAdministrationShell]
29
+ result: list[model.AssetAdministrationShell]
30
30
 
31
- def __init__(self, cursor: str, results: list[model.AssetAdministrationShell]) -> None:
31
+ def __init__(self, cursor: str, result: list[model.AssetAdministrationShell]) -> None:
32
32
  """Initialize a paginated data object.
33
33
 
34
34
  :param paging_metadata: Paging metadata
35
35
  :param results: list of results
36
36
  """
37
37
  self.paging_metadata = PagingMetadata(cursor)
38
- self.results = results
38
+ self.result = result
39
39
 
40
40
 
41
41
  class ReferencePaginatedData:
42
42
  """Class representing paginated data for References."""
43
43
 
44
44
  paging_metadata: PagingMetadata
45
- results: list[model.ModelReference]
45
+ result: list[model.ModelReference]
46
46
 
47
- def __init__(self, cursor: str, results: list[model.ModelReference]) -> None:
47
+ def __init__(self, cursor: str, result: list[model.ModelReference]) -> None:
48
48
  """Initialize a paginated data object.
49
49
 
50
50
  :param paging_metadata: Paging metadata
51
51
  :param results: list of results
52
52
  """
53
53
  self.paging_metadata = PagingMetadata(cursor)
54
- self.results = results
54
+ self.result = result
55
55
 
56
56
 
57
57
  class SubmodelPaginatedData:
58
58
  """Class representing paginated data for Submodels."""
59
59
 
60
60
  paging_metadata: PagingMetadata
61
- results: list[model.Submodel]
61
+ result: list[model.Submodel]
62
62
 
63
63
  def __init__(self, cursor: str, results: list[model.Submodel]) -> None:
64
64
  """Initialize a paginated data object.
@@ -67,30 +67,30 @@ class SubmodelPaginatedData:
67
67
  :param results: list of results
68
68
  """
69
69
  self.paging_metadata = PagingMetadata(cursor)
70
- self.results = results
70
+ self.result = results
71
71
 
72
72
 
73
73
  class SubmodelElementPaginatedData:
74
74
  """Class representing paginated data for Submodel Elements."""
75
75
 
76
76
  paging_metadata: PagingMetadata
77
- results: list[model.SubmodelElement]
77
+ result: list[model.SubmodelElement]
78
78
 
79
- def __init__(self, cursor: str, results: list[model.SubmodelElement]) -> None:
79
+ def __init__(self, cursor: str, result: list[model.SubmodelElement]) -> None:
80
80
  """Initialize a paginated data object.
81
81
 
82
82
  :param paging_metadata: Paging metadata
83
83
  :param results: list of results
84
84
  """
85
85
  self.paging_metadata = PagingMetadata(cursor)
86
- self.results = results
86
+ self.result = result
87
87
 
88
88
 
89
89
  class ShellDescriptorPaginatedData:
90
90
  """Class representing paginated data for Shell Descriptors."""
91
91
 
92
92
  paging_metadata: PagingMetadata
93
- results: list[model.SubmodelElement]
93
+ result: list[model.SubmodelElement]
94
94
 
95
95
  def __init__(self, cursor: str, results: list[model.SubmodelElement]) -> None:
96
96
  """Initialize a paginated data object.
@@ -99,7 +99,7 @@ class ShellDescriptorPaginatedData:
99
99
  :param results: list of results
100
100
  """
101
101
  self.paging_metadata = PagingMetadata(cursor)
102
- self.results = results
102
+ self.result = results
103
103
 
104
104
 
105
105
  def create_shell_paging_data(content: dict) -> ShellPaginatedData | None:
@@ -113,7 +113,7 @@ def create_shell_paging_data(content: dict) -> ShellPaginatedData | None:
113
113
  results: list = content.get("result", [])
114
114
  if not results or len(results) == 0:
115
115
  _logger.warning("No shells found on server.")
116
- return ShellPaginatedData(cursor="", results=[])
116
+ return ShellPaginatedData(cursor="", result=[])
117
117
 
118
118
  for result in results:
119
119
  if not isinstance(result, dict):
@@ -133,7 +133,7 @@ def create_shell_paging_data(content: dict) -> ShellPaginatedData | None:
133
133
 
134
134
  return ShellPaginatedData(
135
135
  cursor=cursor,
136
- results=aas_list,
136
+ result=aas_list,
137
137
  )
138
138
 
139
139
 
@@ -183,7 +183,7 @@ def create_submodel_element_paging_data(content: dict) -> SubmodelElementPaginat
183
183
  results: list = content.get("result", [])
184
184
  if not results or len(results) == 0:
185
185
  _logger.warning("No shells found on server.")
186
- return SubmodelElementPaginatedData(cursor="", results=[])
186
+ return SubmodelElementPaginatedData(cursor="", result=[])
187
187
 
188
188
  for result in results:
189
189
  if not isinstance(result, dict):
@@ -203,7 +203,7 @@ def create_submodel_element_paging_data(content: dict) -> SubmodelElementPaginat
203
203
 
204
204
  return SubmodelElementPaginatedData(
205
205
  cursor=cursor,
206
- results=sme_list,
206
+ result=sme_list,
207
207
  )
208
208
 
209
209
 
@@ -218,7 +218,7 @@ def create_shell_descriptor_paging_data(content: dict) -> SubmodelElementPaginat
218
218
  results: list = content.get("result", [])
219
219
  if not results or len(results) == 0:
220
220
  _logger.warning("No shells found on server.")
221
- return SubmodelElementPaginatedData(cursor="", results=[])
221
+ return SubmodelElementPaginatedData(cursor="", result=[])
222
222
 
223
223
  for result in results:
224
224
  if not isinstance(result, dict):
@@ -238,7 +238,7 @@ def create_shell_descriptor_paging_data(content: dict) -> SubmodelElementPaginat
238
238
 
239
239
  return SubmodelElementPaginatedData(
240
240
  cursor=cursor,
241
- results=sme_list,
241
+ result=sme_list,
242
242
  )
243
243
 
244
244
 
@@ -253,7 +253,7 @@ def create_reference_paging_data(content: dict) -> ReferencePaginatedData | None
253
253
  results: list = content.get("result", [])
254
254
  if not results or len(results) == 0:
255
255
  _logger.warning("No shells found on server.")
256
- return ReferencePaginatedData(cursor="", results=[])
256
+ return ReferencePaginatedData(cursor="", result=[])
257
257
 
258
258
  for result in results:
259
259
  if not isinstance(result, dict):
@@ -273,5 +273,5 @@ def create_reference_paging_data(content: dict) -> ReferencePaginatedData | None
273
273
 
274
274
  return ReferencePaginatedData(
275
275
  cursor=cursor,
276
- results=ref_list,
276
+ result=ref_list,
277
277
  )
@@ -4,5 +4,5 @@ from enum import Enum
4
4
  class LogIntensity(Enum):
5
5
  """Log intensity levels for the AAS HTTP client. Higher levels produce more detailed logs (e.g. for item not found). Standard level only logs critical errors and warnings."""
6
6
 
7
- Standard = 1
8
- High = 2
7
+ STANDARD = 1
8
+ HIGH = 2
@@ -169,3 +169,62 @@ def create_reference(id: str) -> model.ModelReference:
169
169
  :return: ModelReference instance
170
170
  """
171
171
  return model.ModelReference.from_referable(model.Submodel(id))
172
+
173
+
174
+ def create_embedded_data_specification(
175
+ preferred_name: model.PreferredNameTypeIEC61360,
176
+ definition: model.DefinitionTypeIEC61360 | None,
177
+ short_name: model.ShortNameTypeIEC61360 | None,
178
+ unit: str | None,
179
+ unit_id: model.Reference | None,
180
+ data_type: model.DataTypeIEC61360 | None,
181
+ source_of_definition: str | None,
182
+ symbol: str | None,
183
+ value_format: str | None,
184
+ value_list: set[model.ValueReferencePair] | None,
185
+ value: str | None,
186
+ level_types: list[model.IEC61360LevelType] | None,
187
+ ) -> model.EmbeddedDataSpecification | None:
188
+ """Create an embedded data specification with the given parameters.
189
+
190
+ :param preferred_name: The preferred name of the concept description.
191
+ :param definition: The definition of the concept description.
192
+ :param short_name: The short name of the concept description.
193
+ :param unit: The unit of the concept description.
194
+ :param unit_id: The unit reference of the concept description.
195
+ :param data_type: The data type of the concept description.
196
+ :param source_of_definition: The source of definition of the concept description.
197
+ :param symbol: The symbol of the concept description.
198
+ :param value_format: The value format of the concept description.
199
+ :param value_list: The value list of the concept description.
200
+ :param value: The value of the concept description.
201
+ :param level_types: The level types of the concept description.
202
+ :return: An instance of EmbeddedDataSpecification if successful, None otherwise.
203
+ """
204
+ if not preferred_name:
205
+ _logger.warning("Preferred name is missing for the embedded data specification.")
206
+ return None
207
+
208
+ return model.EmbeddedDataSpecification(
209
+ data_specification=model.ExternalReference(
210
+ (
211
+ model.Key(
212
+ type_=model.KeyTypes.GLOBAL_REFERENCE, value="https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/1"
213
+ ),
214
+ )
215
+ ),
216
+ data_specification_content=model.DataSpecificationIEC61360(
217
+ preferred_name=preferred_name,
218
+ definition=definition,
219
+ short_name=short_name,
220
+ unit=unit,
221
+ unit_id=unit_id,
222
+ data_type=data_type,
223
+ source_of_definition=source_of_definition,
224
+ symbol=symbol,
225
+ value_format=value_format,
226
+ value_list=value_list,
227
+ value=value,
228
+ level_types=level_types or (),
229
+ ),
230
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aas-http-client
3
- Version: 1.2.7
3
+ Version: 1.2.9
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
@@ -29,11 +29,10 @@ Project-URL: Homepage, https://github.com/fluid40/aas-http-client
29
29
  Requires-Python: >=3.13
30
30
  Description-Content-Type: text/markdown
31
31
  License-File: LICENSE
32
- Requires-Dist: pydantic>=2.13.4
32
+ Requires-Dist: pydantic>=2.13.5
33
33
  Requires-Dist: requests>=2.34.2
34
- Requires-Dist: basyx-python-sdk>=2.0.1
35
- Requires-Dist: puremagic==1.30
36
- Requires-Dist: types-requests>=2.33.0.20260518
34
+ Requires-Dist: basyx-python-sdk==2.1.0
35
+ Requires-Dist: puremagic==2.2.0
37
36
  Dynamic: license-file
38
37
 
39
38
  # AAS HTTP Client
@@ -0,0 +1,4 @@
1
+ pydantic>=2.13.5
2
+ requests>=2.34.2
3
+ basyx-python-sdk==2.1.0
4
+ puremagic==2.2.0
@@ -4,18 +4,17 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aas-http-client"
7
- version = "1.2.7"
7
+ version = "1.2.9"
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
12
  requires-python = ">=3.13"
13
13
  dependencies = [
14
- "pydantic>=2.13.4",
14
+ "pydantic>=2.13.5",
15
15
  "requests>=2.34.2",
16
- "basyx-python-sdk>=2.0.1",
17
- "puremagic==1.30",
18
- "types-requests>=2.33.0.20260518",
16
+ "basyx-python-sdk==2.1.0",
17
+ "puremagic==2.2.0",
19
18
  ]
20
19
  [project.urls]
21
20
  Homepage = "https://github.com/fluid40/aas-http-client"
@@ -119,7 +119,7 @@ def test_001b_delete_all_asset_administration_shells(wrapper: SdkWrapper):
119
119
  result = wrapper.get_all_asset_administration_shells()
120
120
  assert result is not None
121
121
 
122
- for shell in result.results:
122
+ for shell in result.result:
123
123
  shell_id = shell.id
124
124
 
125
125
  if wrapper.get_encoded_ids() == IdEncoding.encoded:
@@ -130,13 +130,13 @@ def test_001b_delete_all_asset_administration_shells(wrapper: SdkWrapper):
130
130
  assert delete_result
131
131
 
132
132
  shells_result = wrapper.get_all_asset_administration_shells()
133
- assert len(shells_result.results) == 0
133
+ assert len(shells_result.result) == 0
134
134
 
135
135
  def test_001c_delete_all_submodels(wrapper: SdkWrapper):
136
136
  result = wrapper.get_all_submodels()
137
137
  assert result is not None
138
138
 
139
- for submodel in result.results:
139
+ for submodel in result.result:
140
140
  submodel_id = submodel.id
141
141
 
142
142
  if wrapper.get_encoded_ids() == IdEncoding.encoded:
@@ -147,12 +147,12 @@ def test_001c_delete_all_submodels(wrapper: SdkWrapper):
147
147
  assert delete_result
148
148
 
149
149
  submodels_result = wrapper.get_all_submodels()
150
- assert len(submodels_result.results) == 0
150
+ assert len(submodels_result.result) == 0
151
151
 
152
152
  def test_002_get_all_asset_administration_shells(wrapper: SdkWrapper):
153
153
  shells = wrapper.get_all_asset_administration_shells()
154
154
  assert shells is not None
155
- assert len(shells.results) == 0
155
+ assert len(shells.result) == 0
156
156
 
157
157
  def test_003_post_asset_administration_shell(wrapper: SdkWrapper, shared_aas: model.AssetAdministrationShell):
158
158
  shell = wrapper.post_asset_administration_shell(shared_aas)
@@ -163,9 +163,9 @@ def test_003_post_asset_administration_shell(wrapper: SdkWrapper, shared_aas: mo
163
163
 
164
164
  shells = wrapper.get_all_asset_administration_shells()
165
165
  assert shells is not None
166
- assert len(shells.results) == 1
167
- assert shells.results[0].id_short == shared_aas.id_short
168
- assert shells.results[0].id == SHELL_ID
166
+ assert len(shells.result) == 1
167
+ assert shells.result[0].id_short == shared_aas.id_short
168
+ assert shells.result[0].id == SHELL_ID
169
169
 
170
170
  def test_004a_get_asset_administration_shell_by_id(wrapper: SdkWrapper, shared_aas: model.AssetAdministrationShell):
171
171
  shell_id = SHELL_ID
@@ -273,7 +273,7 @@ def test_007_get_submodel_by_id_aas_repository(wrapper: SdkWrapper, shared_sm: m
273
273
  def test_008_get_all_submodels(wrapper: SdkWrapper):
274
274
  submodels = wrapper.get_all_submodels()
275
275
  assert submodels is not None
276
- assert len(submodels.results) == 0
276
+ assert len(submodels.result) == 0
277
277
 
278
278
  def test_009a_post_submodel(wrapper: SdkWrapper, shared_sm: model.Submodel):
279
279
  submodel = wrapper.post_submodel(shared_sm)
@@ -284,9 +284,9 @@ def test_009a_post_submodel(wrapper: SdkWrapper, shared_sm: model.Submodel):
284
284
 
285
285
  submodels = wrapper.get_all_submodels()
286
286
  assert submodels is not None
287
- assert len(submodels.results) == 1
288
- assert submodels.results[0].id_short == shared_sm.id_short
289
- assert submodels.results[0].id == SM_ID
287
+ assert len(submodels.result) == 1
288
+ assert submodels.result[0].id_short == shared_sm.id_short
289
+ assert submodels.result[0].id == SM_ID
290
290
 
291
291
  def test_009b_post_submodel(wrapper: SdkWrapper):
292
292
  sm_template_file = Path(f"./tests/test_data/aimc.json").resolve()
@@ -303,7 +303,7 @@ def test_009b_post_submodel(wrapper: SdkWrapper):
303
303
 
304
304
  get_result = wrapper.get_all_submodels()
305
305
  assert get_result is not None
306
- submodels = get_result.results
306
+ submodels = get_result.result
307
307
  assert len(submodels) == 2
308
308
 
309
309
  def test_010_get_submodel_by_id_aas_repository(wrapper: SdkWrapper, shared_sm: model.Submodel):
@@ -479,7 +479,7 @@ def test_015_get_all_submodel_elements_submodel_repository(wrapper: SdkWrapper):
479
479
  submodel_elements = wrapper.get_all_submodel_elements_submodel_repository(sm_id)
480
480
 
481
481
  assert submodel_elements is not None
482
- assert len(submodel_elements.results) == 0
482
+ assert len(submodel_elements.result) == 0
483
483
 
484
484
  def test_016a_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sme_string: model.Property):
485
485
  sm_id = SM_ID
@@ -503,7 +503,7 @@ def test_016a_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sm
503
503
  submodel_elements = wrapper.get_all_submodel_elements_submodel_repository(sm_id)
504
504
 
505
505
  assert submodel_elements is not None
506
- assert len(submodel_elements.results) == 1
506
+ assert len(submodel_elements.result) == 1
507
507
 
508
508
  def test_016b_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sme_bool: model.Property):
509
509
  sm_id = SM_ID
@@ -527,7 +527,7 @@ def test_016b_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sm
527
527
  submodel_elements = wrapper.get_all_submodel_elements_submodel_repository(sm_id)
528
528
 
529
529
  assert submodel_elements is not None
530
- assert len(submodel_elements.results) == 2
530
+ assert len(submodel_elements.result) == 2
531
531
 
532
532
  def test_016c_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sme_int: model.Property):
533
533
  sm_id = SM_ID
@@ -551,7 +551,7 @@ def test_016c_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sm
551
551
  submodel_elements = wrapper.get_all_submodel_elements_submodel_repository(sm_id)
552
552
 
553
553
  assert submodel_elements is not None
554
- assert len(submodel_elements.results) == 3
554
+ assert len(submodel_elements.result) == 3
555
555
 
556
556
  def test_016d_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sme_float: model.Property):
557
557
  sm_id = SM_ID
@@ -575,7 +575,7 @@ def test_016d_post_submodel_element_submodel_repo(wrapper: SdkWrapper, shared_sm
575
575
  submodel_elements = wrapper.get_all_submodel_elements_submodel_repository(sm_id)
576
576
 
577
577
  assert submodel_elements is not None
578
- assert len(submodel_elements.results) == 4
578
+ assert len(submodel_elements.result) == 4
579
579
 
580
580
  def test_017a_get_submodel_element_by_path_submodel_repo(wrapper: SdkWrapper, shared_sme_string: model.Property):
581
581
  sm_id = SM_ID
@@ -1054,7 +1054,7 @@ def test_029_get_all_submodel_references_aas_repository(wrapper: SdkWrapper):
1054
1054
 
1055
1055
  result = wrapper.get_all_submodel_references_aas_repository(shell_id)
1056
1056
  assert result is not None
1057
- references = result.results
1057
+ references = result.result
1058
1058
  assert len(references) == 1
1059
1059
 
1060
1060
  def test_030_post_submodel_reference_aas_repository(wrapper: SdkWrapper):
@@ -1077,7 +1077,7 @@ def test_030_post_submodel_reference_aas_repository(wrapper: SdkWrapper):
1077
1077
 
1078
1078
  check_result = wrapper.get_all_submodel_references_aas_repository(shell_id)
1079
1079
  assert check_result is not None
1080
- assert len(check_result.results) == 2
1080
+ assert len(check_result.result) == 2
1081
1081
 
1082
1082
  def test_031_delete_submodel_reference_by_id_aas_repository(wrapper: SdkWrapper):
1083
1083
  shell_id = SHELL_ID
@@ -1093,7 +1093,7 @@ def test_031_delete_submodel_reference_by_id_aas_repository(wrapper: SdkWrapper)
1093
1093
 
1094
1094
  get_result = wrapper.get_all_submodel_references_aas_repository(shell_id)
1095
1095
  assert get_result is not None
1096
- assert len(get_result.results) == 1
1096
+ assert len(get_result.result) == 1
1097
1097
 
1098
1098
  def test_032_put_submodel_element_by_path_submodel_repo(wrapper: SdkWrapper, shared_sme_string: model.Property):
1099
1099
  sm_id = SM_ID
@@ -1314,7 +1314,7 @@ def test_098_delete_asset_administration_shell_by_id(wrapper: SdkWrapper):
1314
1314
 
1315
1315
  shells = wrapper.get_all_asset_administration_shells()
1316
1316
  assert shells is not None
1317
- assert len(shells.results) == 0
1317
+ assert len(shells.result) == 0
1318
1318
 
1319
1319
  def test_099a_delete_submodel_by_id(wrapper: SdkWrapper):
1320
1320
  sm_id = SM_ID
@@ -1328,7 +1328,7 @@ def test_099a_delete_submodel_by_id(wrapper: SdkWrapper):
1328
1328
 
1329
1329
  submodels = wrapper.get_all_submodels()
1330
1330
  assert submodels is not None
1331
- assert len(submodels.results) == 1
1331
+ assert len(submodels.result) == 1
1332
1332
 
1333
1333
  def test_099b_delete_submodel_by_id(wrapper: SdkWrapper):
1334
1334
  sm_id = SM_ID
@@ -1342,4 +1342,4 @@ def test_099b_delete_submodel_by_id(wrapper: SdkWrapper):
1342
1342
 
1343
1343
  submodels = wrapper.get_all_submodels()
1344
1344
  assert submodels is not None
1345
- assert len(submodels.results) == 0
1345
+ assert len(submodels.result) == 0
@@ -1,5 +0,0 @@
1
- pydantic>=2.13.4
2
- requests>=2.34.2
3
- basyx-python-sdk>=2.0.1
4
- puremagic==1.30
5
- types-requests>=2.33.0.20260518
File without changes