aas-http-client 1.3.0__tar.gz → 1.3.2__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.0 → aas_http_client-1.3.2}/PKG-INFO +3 -1
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/README.md +2 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/encoder.py +15 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client.egg-info/PKG-INFO +3 -1
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/pyproject.toml +1 -1
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/tests/test_client.py +2 -3
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/tests/test_utils.py +12 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/tests/test_wrapper.py +2 -1
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/LICENSE +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/__init__.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/Configuration/config_classes.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/aas_client.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/__init__.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/authentication.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/experimental_implementation.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/shell_implementation.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/sm_implementation.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/wrapper/attachment.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/wrapper/pagination.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/demo/demo_process.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/demo/logging_handler.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/__init__.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/constants.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/http_helper.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/model_builder.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/sdk_tools.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/utilities/version_check.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client.egg-info/SOURCES.txt +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client.egg-info/dependency_links.txt +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client.egg-info/requires.txt +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client.egg-info/top_level.txt +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/setup.cfg +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/tests/test_client_reg.py +0 -0
- {aas_http_client-1.3.0 → aas_http_client-1.3.2}/tests/test_sdk_tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aas-http-client
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
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
|
|
@@ -57,6 +57,8 @@ AAS HTTP Client is a flexible Python library for interacting with Asset Administ
|
|
|
57
57
|
- [🔧 Provided Utilities](#-provided-utilities)
|
|
58
58
|
- [📚 Resources](#-resources)
|
|
59
59
|
- [⚡ Quickstart](#-quickstart)
|
|
60
|
+
- [Client](#client)
|
|
61
|
+
- [Wrapper](#wrapper)
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
|
@@ -4,6 +4,7 @@ Provides some helper methods for base 64 encoding.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import base64
|
|
7
|
+
import binascii
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def decode_base_64(text: str) -> str:
|
|
@@ -28,3 +29,17 @@ def encode_base_64(text: str) -> str:
|
|
|
28
29
|
"""
|
|
29
30
|
encoded_bytes = base64.urlsafe_b64encode(text.encode("utf-8")).rstrip(b"=")
|
|
30
31
|
return encoded_bytes.decode("utf-8")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def is_base_64_encoded(value: str) -> bool:
|
|
35
|
+
"""Check if a string is Base64 encoded.
|
|
36
|
+
|
|
37
|
+
:param value: String to check
|
|
38
|
+
:return: True if the string is Base64 encoded, False otherwise
|
|
39
|
+
"""
|
|
40
|
+
try:
|
|
41
|
+
decoded = decode_base_64(value)
|
|
42
|
+
except (binascii.Error, ValueError):
|
|
43
|
+
return False
|
|
44
|
+
|
|
45
|
+
return encode_base_64(decoded) == value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aas-http-client
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
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
|
|
@@ -57,6 +57,8 @@ AAS HTTP Client is a flexible Python library for interacting with Asset Administ
|
|
|
57
57
|
- [🔧 Provided Utilities](#-provided-utilities)
|
|
58
58
|
- [📚 Resources](#-resources)
|
|
59
59
|
- [⚡ Quickstart](#-quickstart)
|
|
60
|
+
- [Client](#client)
|
|
61
|
+
- [Wrapper](#wrapper)
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
|
@@ -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.2"
|
|
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" }
|
|
@@ -24,13 +24,12 @@ AIMC_SM_ID = "https://fluid40.de/ids/sm/7644_4034_2556_2369"
|
|
|
24
24
|
SM_ID = "fluid40/sm_http_client_unit_tests"
|
|
25
25
|
SHELL_ID = "fluid40/aas_http_client_unit_tests"
|
|
26
26
|
|
|
27
|
-
#"./tests/server_configs/test_go_server_config.json",
|
|
28
|
-
|
|
27
|
+
# "./tests/server_configs/test_go_server_config.json",
|
|
28
|
+
# "./tests/server_configs/test_python_server_config.json"
|
|
29
29
|
CONFIG_FILES = [
|
|
30
30
|
"./tests/server_configs/test_java_server_config.json",
|
|
31
31
|
"./tests/server_configs/test_java_server_alias_config.json",
|
|
32
32
|
"./tests/server_configs/test_dotnet_server_config.json",
|
|
33
|
-
"./tests/server_configs/test_python_server_config.json"
|
|
34
33
|
]
|
|
35
34
|
|
|
36
35
|
# CONFIG_FILES = [
|
|
@@ -33,3 +33,15 @@ def test_002b_encode_base_64():
|
|
|
33
33
|
assert encoded == "aHR0cHM6Ly9mbHVpZDQwLmRlL2lkcy9zbS8xNTE1XzUzMDZfNzYyNF81MzY3"
|
|
34
34
|
new_decoded = encoder.decode_base_64(encoded)
|
|
35
35
|
assert new_decoded == decoded
|
|
36
|
+
|
|
37
|
+
def test_003a_decode_base_64():
|
|
38
|
+
encoded = "aHR0cHM6Ly9mbHVpZDQwLmRlL2lkcy9zbS8xNTE1XzUzMDZfNzYyNF81MzY3"
|
|
39
|
+
assert encoder.is_base_64_encoded(encoded)
|
|
40
|
+
encoded = "RW5lcmd5TW9uaXRvcmluZw"
|
|
41
|
+
assert encoder.is_base_64_encoded(encoded)
|
|
42
|
+
|
|
43
|
+
def test_003b_decode_base_64():
|
|
44
|
+
decoded = "https://fluid40.de/ids/sm/1515_5306_7624_5367"
|
|
45
|
+
assert not encoder.is_base_64_encoded(decoded)
|
|
46
|
+
decoded == "EnergyMonitoring"
|
|
47
|
+
assert not encoder.is_base_64_encoded(decoded)
|
|
@@ -18,11 +18,12 @@ AIMC_SM_ID = "https://fluid40.de/ids/sm/7644_4034_2556_2369"
|
|
|
18
18
|
SM_ID = "fluid40/sm_http_client_unit_tests"
|
|
19
19
|
SHELL_ID = "fluid40/aas_http_client_unit_tests"
|
|
20
20
|
|
|
21
|
+
#"./tests/server_configs/test_python_server_config.json"
|
|
22
|
+
|
|
21
23
|
CONFIG_FILES = [
|
|
22
24
|
"./tests/server_configs/test_java_server_config.json",
|
|
23
25
|
"./tests/server_configs/test_java_server_alias_config.json",
|
|
24
26
|
"./tests/server_configs/test_dotnet_server_config.json",
|
|
25
|
-
"./tests/server_configs/test_python_server_config.json"
|
|
26
27
|
]
|
|
27
28
|
|
|
28
29
|
# CONFIG_FILES = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.3.0 → aas_http_client-1.3.2}/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
|
|
File without changes
|
{aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/wrapper/attachment.py
RENAMED
|
File without changes
|
{aas_http_client-1.3.0 → aas_http_client-1.3.2}/aas_http_client/classes/wrapper/pagination.py
RENAMED
|
File without changes
|
{aas_http_client-1.3.0 → aas_http_client-1.3.2}/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.3.0 → aas_http_client-1.3.2}/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
|