aas-http-client 0.3.3__py3-none-any.whl → 0.3.4__py3-none-any.whl

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.

Potentially problematic release.


This version of aas-http-client might be problematic. Click here for more details.

aas_http_client/client.py CHANGED
@@ -75,7 +75,6 @@ class AasHttpClient(BaseModel):
75
75
 
76
76
  base_url: str = "http://javaaasserver:5060/"
77
77
  username: str | None = None
78
- _password: str | None = PrivateAttr(default=None)
79
78
  https_proxy: str | None = None
80
79
  http_proxy: str | None = None
81
80
  time_out: int = 200
@@ -88,13 +87,11 @@ class AasHttpClient(BaseModel):
88
87
 
89
88
  :param password: password
90
89
  """
91
- self._password = password
92
-
93
90
  if self.base_url.endswith("/"):
94
91
  self.base_url = self.base_url[:-1]
95
92
 
96
93
  self._session = requests.Session()
97
- self._session.auth = HTTPBasicAuth(self.username, self._password)
94
+ self._session.auth = HTTPBasicAuth(self.username, password)
98
95
  self._session.verify = self.ssl_verify
99
96
 
100
97
  if self.https_proxy:
@@ -660,11 +657,11 @@ def create_client_by_config(config_file: Path, password: str = "") -> AasHttpCli
660
657
  return _create_client(config_string, password)
661
658
 
662
659
 
663
- def _create_client(config_string: str, password) -> AasHttpClient | None:
660
+ def _create_client(config_string: str, password: str) -> AasHttpClient | None:
664
661
  try:
665
662
  client = AasHttpClient.model_validate_json(config_string)
666
663
  except ValidationError as ve:
667
- raise ValidationError(f"Invalid BaSyx server connection file: {ve}") from ve
664
+ raise ValidationError(f"Invalid BaSyx server configuration file: {ve}") from ve
668
665
 
669
666
  logger.info(
670
667
  f"Using server configuration: '{client.base_url}' | "
@@ -288,8 +288,15 @@ class SdkWrapper:
288
288
  """
289
289
  return self._client.patch_submodel_element_by_path_value_only_submodel_repo(submodel_id, submodel_element_path, value)
290
290
 
291
+ # endregion
292
+
293
+ def get_client(self) -> AasHttpClient:
294
+ """Returns the underlying AAS HTTP client.
295
+
296
+ :return: The AAS HTTP client instance.
297
+ """
298
+ return self._client
291
299
 
292
- # endregion
293
300
 
294
301
  # region utils
295
302
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aas-http-client
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Generic python HTTP client for communication with various types of AAS servers
5
5
  Author-email: Daniel Klein <daniel.klein@em.ag>
6
6
  License: # :em engineering methods AG Software License
@@ -1,14 +1,14 @@
1
1
  aas_http_client/__init__.py,sha256=cAr1mQzWp0G0LKtkAOYzc9t95OY3jM3Aj4bKnxx0Dso,901
2
- aas_http_client/client.py,sha256=LXqhMLkNO9Itu9Pj369vJurBCd0kiqvhrgnahEmkUtI,27041
2
+ aas_http_client/client.py,sha256=DFflDiU7oyDQ98-X4KQlkFDKQFN3_hqBd723n_h-NkE,26954
3
3
  aas_http_client/core/encoder.py,sha256=FS7P0FPakzFsGz70eRFDHQZFA_2nlKLlWIxavtnFrPg,660
4
4
  aas_http_client/core/version_check.py,sha256=721Zs3xSRrJTYZtAxkaUWg9LLKtpU7oFM62DzQHZdE4,705
5
5
  aas_http_client/demo/demo_process.py,sha256=6sN_N3QbA4iLUmzeg1Y_XOwVAuDNtwkR4grAg7EkjWM,3301
6
6
  aas_http_client/demo/logging_handler.py,sha256=VJtZ4u3x_LhYZQtfNck7FuXhGFZm7gid0uDhvf9GjJ8,5596
7
7
  aas_http_client/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  aas_http_client/utilities/model_builder.py,sha256=EUqVvKgXiyJNtyUeFrL6ronfF4hiF1KCipxSaLj6EiE,4465
9
- aas_http_client/wrapper/sdk_wrapper.py,sha256=KOPcnW0SrpoH6Z6ycDtzSmMdbk2MHj_UqbEbKGgGfWA,15010
10
- aas_http_client-0.3.3.dist-info/licenses/LICENSE,sha256=ayt4HY-Tjoe1Uvj47j6UdNq8mEufKcKFangurChIHxQ,5990
11
- aas_http_client-0.3.3.dist-info/METADATA,sha256=RtgD4C2wO1BBzPXRaU7xVRxZHuGuSQX6M7ca5B-tJHM,10467
12
- aas_http_client-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- aas_http_client-0.3.3.dist-info/top_level.txt,sha256=vzvoz2vjeTLwpuz-Y-eEfoQ7T3byoaKshVlFMFH5NaM,16
14
- aas_http_client-0.3.3.dist-info/RECORD,,
9
+ aas_http_client/wrapper/sdk_wrapper.py,sha256=dSckMIbFJ_9wFvYKVjWNPIofcl5aINk43nIY3Un0ht4,15197
10
+ aas_http_client-0.3.4.dist-info/licenses/LICENSE,sha256=ayt4HY-Tjoe1Uvj47j6UdNq8mEufKcKFangurChIHxQ,5990
11
+ aas_http_client-0.3.4.dist-info/METADATA,sha256=Iel95Gsqa7EywECf0qFN1IuMCbK6hlwk_rNzm0_IqgE,10467
12
+ aas_http_client-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ aas_http_client-0.3.4.dist-info/top_level.txt,sha256=vzvoz2vjeTLwpuz-Y-eEfoQ7T3byoaKshVlFMFH5NaM,16
14
+ aas_http_client-0.3.4.dist-info/RECORD,,