aas-http-client 0.3.8__py3-none-any.whl → 0.4.0__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/__init__.py +16 -7
- aas_http_client/utilities/model_builder.py +6 -9
- {aas_http_client-0.3.8.dist-info → aas_http_client-0.4.0.dist-info}/METADATA +1 -1
- {aas_http_client-0.3.8.dist-info → aas_http_client-0.4.0.dist-info}/RECORD +7 -7
- {aas_http_client-0.3.8.dist-info → aas_http_client-0.4.0.dist-info}/WHEEL +0 -0
- {aas_http_client-0.3.8.dist-info → aas_http_client-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {aas_http_client-0.3.8.dist-info → aas_http_client-0.4.0.dist-info}/top_level.txt +0 -0
aas_http_client/__init__.py
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
1
|
import importlib.metadata
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
|
|
4
|
-
__copyright__ = f"Copyright (C) {datetime.now().year} :em engineering methods AG. All rights reserved."
|
|
4
|
+
__copyright__ = f"Copyright (C) {datetime.now(tz=timezone.utc).year} :em engineering methods AG. All rights reserved."
|
|
5
5
|
__author__ = "Daniel Klein"
|
|
6
6
|
|
|
7
7
|
try:
|
|
8
8
|
__version__ = importlib.metadata.version(__name__)
|
|
9
9
|
except importlib.metadata.PackageNotFoundError:
|
|
10
10
|
__version__ = "0.0.0-dev"
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
__project__ = "aas-http-client"
|
|
13
13
|
__package__ = "aas-http-client"
|
|
14
14
|
|
|
15
|
+
from aas_http_client.client import AasHttpClient, create_client_by_config, create_client_by_url
|
|
15
16
|
from aas_http_client.core.version_check import check_for_update
|
|
16
|
-
from aas_http_client.
|
|
17
|
-
from aas_http_client.
|
|
18
|
-
from aas_http_client.wrapper.sdk_wrapper import create_wrapper_by_config, create_wrapper_by_url, SdkWrapper
|
|
17
|
+
from aas_http_client.utilities import model_builder, sdk_tools
|
|
18
|
+
from aas_http_client.wrapper.sdk_wrapper import SdkWrapper, create_wrapper_by_config, create_wrapper_by_url
|
|
19
19
|
|
|
20
20
|
check_for_update()
|
|
21
21
|
|
|
22
|
-
__all__ = [
|
|
22
|
+
__all__ = [
|
|
23
|
+
"create_client_by_config",
|
|
24
|
+
"create_client_by_url",
|
|
25
|
+
"AasHttpClient",
|
|
26
|
+
"model_builder",
|
|
27
|
+
"create_wrapper_by_config",
|
|
28
|
+
"create_wrapper_by_url",
|
|
29
|
+
"SdkWrapper",
|
|
30
|
+
"sdk_tools",
|
|
31
|
+
]
|
|
@@ -39,17 +39,15 @@ def create_base_submodel_element_property(
|
|
|
39
39
|
return sme
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def create_base_submodel(
|
|
42
|
+
def create_base_submodel(identifier: str, id_short: str, display_name: str = "", description: str = "") -> model.Submodel:
|
|
43
43
|
"""Create a basic Submodel.
|
|
44
44
|
|
|
45
|
+
:param identifier: identifier of the Submodel
|
|
45
46
|
:param id_short: ID short of the Submodel
|
|
46
|
-
:param namespace: namespace of the Submodel , defaults to "fluid40"
|
|
47
47
|
:param display_name: display name of the Submodel, defaults to ""
|
|
48
48
|
:param description: description of the Submodel, defaults to ""
|
|
49
49
|
:return: Submodel instance
|
|
50
50
|
"""
|
|
51
|
-
identifier = f"{namespace}/{id_short}" if namespace else id_short
|
|
52
|
-
|
|
53
51
|
sm = model.Submodel(identifier)
|
|
54
52
|
sm.id_short = id_short
|
|
55
53
|
|
|
@@ -68,16 +66,16 @@ def create_base_submodel(id_short: str, namespace: str = "fluid40", display_name
|
|
|
68
66
|
return sm
|
|
69
67
|
|
|
70
68
|
|
|
71
|
-
def create_base_ass(
|
|
69
|
+
def create_base_ass(identifier: str, id_short: str, display_name: str = "", description: str = "") -> model.AssetAdministrationShell:
|
|
72
70
|
"""Create a basic AAS.
|
|
73
71
|
|
|
72
|
+
:param identifier: identifier of the AAS
|
|
74
73
|
:param id_short: ID short of the AAS
|
|
75
|
-
:param namespace: namespace of the AAS, defaults to "basyx_python_aas_server"
|
|
76
74
|
:param display_name: display name of the AAS, defaults to ""
|
|
77
75
|
:param description: description of the AAS, defaults to ""
|
|
78
76
|
:return: AssetAdministrationShell instance
|
|
79
77
|
"""
|
|
80
|
-
asset_info = create_base_asset_information(
|
|
78
|
+
asset_info = create_base_asset_information(identifier)
|
|
81
79
|
|
|
82
80
|
aas = model.AssetAdministrationShell(id_=asset_info.global_asset_id, asset_information=asset_info)
|
|
83
81
|
aas.id_short = id_short
|
|
@@ -97,14 +95,13 @@ def create_base_ass(id_short: str, namespace: str = "fluid40", display_name: str
|
|
|
97
95
|
return aas
|
|
98
96
|
|
|
99
97
|
|
|
100
|
-
def create_base_asset_information(
|
|
98
|
+
def create_base_asset_information(identifier: str) -> model.AssetInformation:
|
|
101
99
|
"""Return a basic AssetInformation instance.
|
|
102
100
|
|
|
103
101
|
:param id_short: short ID of the AssetInformation
|
|
104
102
|
:param namespace: namespace of the AssetInformation, defaults to "basyx_python_aas_server"
|
|
105
103
|
:return: AssetInformation instance
|
|
106
104
|
"""
|
|
107
|
-
identifier = f"{namespace}/{id_short}" if namespace else id_short
|
|
108
105
|
return model.AssetInformation(model.AssetKind.INSTANCE, identifier)
|
|
109
106
|
|
|
110
107
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aas-http-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
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
|
-
aas_http_client/__init__.py,sha256=
|
|
1
|
+
aas_http_client/__init__.py,sha256=bBfrdXUHvukisXIj0CcnNUHUw8_7nrdnfQRve8nM_3U,982
|
|
2
2
|
aas_http_client/client.py,sha256=CtX1nlIo65-Um9AlXZ3gOfEMJwcLDJNOssxkGXAlsg0,27205
|
|
3
3
|
aas_http_client/core/encoder.py,sha256=FS7P0FPakzFsGz70eRFDHQZFA_2nlKLlWIxavtnFrPg,660
|
|
4
4
|
aas_http_client/core/version_check.py,sha256=9dR0Q6jCFygH_ctj4vyrjerpHvolT87ayengZFlBWCw,708
|
|
5
5
|
aas_http_client/demo/demo_process.py,sha256=s60SBx0le1G2BU_uJ8vC5i6zTcSGQprSnYafZPUtOtE,3299
|
|
6
6
|
aas_http_client/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
aas_http_client/utilities/model_builder.py,sha256=
|
|
7
|
+
aas_http_client/utilities/model_builder.py,sha256=6pZ0mcfofkuCu24wp71vhBKyaLXJcHpU8N4PBHx_Xpo,3782
|
|
8
8
|
aas_http_client/utilities/sdk_tools.py,sha256=QPpItZdhw8y13IgpS015vTAb8e8QfPeidUuE6-K0JIo,1637
|
|
9
9
|
aas_http_client/wrapper/sdk_wrapper.py,sha256=67RiQ5qAgFq84817QurGX-GJBsM3QI3k4-uBC7sOQio,14807
|
|
10
|
-
aas_http_client-0.
|
|
11
|
-
aas_http_client-0.
|
|
12
|
-
aas_http_client-0.
|
|
13
|
-
aas_http_client-0.
|
|
14
|
-
aas_http_client-0.
|
|
10
|
+
aas_http_client-0.4.0.dist-info/licenses/LICENSE,sha256=ayt4HY-Tjoe1Uvj47j6UdNq8mEufKcKFangurChIHxQ,5990
|
|
11
|
+
aas_http_client-0.4.0.dist-info/METADATA,sha256=o5uysJOtlvq_E-ALEMnnw0oEAbfHXYqGOhT2xpRKmVc,10467
|
|
12
|
+
aas_http_client-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
aas_http_client-0.4.0.dist-info/top_level.txt,sha256=vzvoz2vjeTLwpuz-Y-eEfoQ7T3byoaKshVlFMFH5NaM,16
|
|
14
|
+
aas_http_client-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|