ActionStreamer 0.2.18__tar.gz → 0.2.20__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.
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/CommonFunctions.py +2 -2
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/API/API.py +3 -4
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Event/Event.py +17 -18
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/File/File.py +2 -1
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Health/Health.py +4 -4
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/LogMessage/LogMessage.py +5 -6
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/VideoClip/VideoClip.py +0 -1
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/PKG-INFO +1 -1
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/pyproject.toml +1 -1
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/Wifi/Wifi.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/Wifi/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Config/Config.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Config/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Device/Device.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Device/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Model/Model.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/Model/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/API/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Event/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/File/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Health/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/LogMessage/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Patch/Patch.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Patch/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/VideoClip/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/__init__.py +0 -0
- {actionstreamer-0.2.18 → actionstreamer-0.2.20}/README.md +0 -0
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/CommonFunctions.py
RENAMED
|
@@ -10,7 +10,7 @@ import re
|
|
|
10
10
|
|
|
11
11
|
import pytz
|
|
12
12
|
import requests
|
|
13
|
-
|
|
13
|
+
from ActionStreamer.Config import WebServiceConfig
|
|
14
14
|
|
|
15
15
|
class StandardResult:
|
|
16
16
|
|
|
@@ -74,7 +74,7 @@ def log_to_console(message, agent_name=''):
|
|
|
74
74
|
print(result_string)
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
def send_signed_request(ws_config, method, url, path, headers=None, parameters=None, body=None):
|
|
77
|
+
def send_signed_request(ws_config: WebServiceConfig, method, url, path, headers=None, parameters=None, body=None):
|
|
78
78
|
|
|
79
79
|
try:
|
|
80
80
|
if headers is None:
|
|
@@ -2,8 +2,7 @@ import datetime
|
|
|
2
2
|
import json
|
|
3
3
|
from json import JSONEncoder
|
|
4
4
|
|
|
5
|
-
import ActionStreamer
|
|
6
|
-
from ActionStreamer import CommonFunctions
|
|
5
|
+
import ActionStreamer.CommonFunctions
|
|
7
6
|
|
|
8
7
|
class PatchOperation:
|
|
9
8
|
|
|
@@ -40,11 +39,11 @@ def register_agent(ws_config, device_name, agent_type, agent_version, agent_inde
|
|
|
40
39
|
parameters = ''
|
|
41
40
|
body = json.dumps(jsonPostData)
|
|
42
41
|
|
|
43
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
42
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
44
43
|
|
|
45
44
|
except Exception as ex:
|
|
46
45
|
|
|
47
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
46
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
48
47
|
if filename is not None and line_number is not None:
|
|
49
48
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
50
49
|
print(ex)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
import ActionStreamer
|
|
4
|
-
|
|
5
|
-
from ActionStreamer.WebService.API import WebServiceResult
|
|
3
|
+
import ActionStreamer.CommonFunctions
|
|
4
|
+
import ActionStreamer.WebService.API
|
|
6
5
|
|
|
7
6
|
def get_pending_event_list(ws_config, device_name):
|
|
8
7
|
|
|
9
|
-
ws_result = WebServiceResult(0, '', '', '', None)
|
|
8
|
+
ws_result = ActionStreamer.WebService.API.WebServiceResult(0, '', '', '', None)
|
|
10
9
|
|
|
11
10
|
try:
|
|
12
11
|
method = "POST"
|
|
@@ -21,7 +20,7 @@ def get_pending_event_list(ws_config, device_name):
|
|
|
21
20
|
|
|
22
21
|
body = json.dumps(json_post_data)
|
|
23
22
|
|
|
24
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
23
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
25
24
|
|
|
26
25
|
ws_result.http_response_code = response_code
|
|
27
26
|
ws_result.http_response_string = response_string
|
|
@@ -29,7 +28,7 @@ def get_pending_event_list(ws_config, device_name):
|
|
|
29
28
|
|
|
30
29
|
except Exception as ex:
|
|
31
30
|
ws_result.code = -1
|
|
32
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
31
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
33
32
|
if filename is not None and line_number is not None:
|
|
34
33
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
35
34
|
print(ex)
|
|
@@ -40,7 +39,7 @@ def get_pending_event_list(ws_config, device_name):
|
|
|
40
39
|
|
|
41
40
|
def dequeue_event(ws_config, device_name, agent_type):
|
|
42
41
|
|
|
43
|
-
ws_result = WebServiceResult(0, '', '', '', None)
|
|
42
|
+
ws_result = ActionStreamer.WebService.API.WebServiceResult(0, '', '', '', None)
|
|
44
43
|
|
|
45
44
|
try:
|
|
46
45
|
method = "POST"
|
|
@@ -56,7 +55,7 @@ def dequeue_event(ws_config, device_name, agent_type):
|
|
|
56
55
|
|
|
57
56
|
body = json.dumps(json_post_data)
|
|
58
57
|
|
|
59
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
58
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
60
59
|
|
|
61
60
|
ws_result.http_response_code = response_code
|
|
62
61
|
ws_result.http_response_string = response_string
|
|
@@ -64,7 +63,7 @@ def dequeue_event(ws_config, device_name, agent_type):
|
|
|
64
63
|
|
|
65
64
|
except Exception as ex:
|
|
66
65
|
ws_result.code = -1
|
|
67
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
66
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
68
67
|
if filename is not None and line_number is not None:
|
|
69
68
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
70
69
|
print(ex)
|
|
@@ -75,7 +74,7 @@ def dequeue_event(ws_config, device_name, agent_type):
|
|
|
75
74
|
|
|
76
75
|
def create_event(ws_config, device_name, agent_type, event_type, event_parameters, priority=1, max_attempts=0, expiration_date=None):
|
|
77
76
|
|
|
78
|
-
ws_result = WebServiceResult(0, '', '', '', None)
|
|
77
|
+
ws_result = ActionStreamer.WebService.API.WebServiceResult(0, '', '', '', None)
|
|
79
78
|
|
|
80
79
|
try:
|
|
81
80
|
method = "POST"
|
|
@@ -96,7 +95,7 @@ def create_event(ws_config, device_name, agent_type, event_type, event_parameter
|
|
|
96
95
|
|
|
97
96
|
body = json.dumps(json_post_data)
|
|
98
97
|
|
|
99
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
98
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
100
99
|
|
|
101
100
|
ws_result.http_response_code = response_code
|
|
102
101
|
ws_result.http_response_string = response_string
|
|
@@ -104,7 +103,7 @@ def create_event(ws_config, device_name, agent_type, event_type, event_parameter
|
|
|
104
103
|
|
|
105
104
|
except Exception as ex:
|
|
106
105
|
ws_result.code = -1
|
|
107
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
106
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
108
107
|
if filename is not None and line_number is not None:
|
|
109
108
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
110
109
|
print(ex)
|
|
@@ -115,7 +114,7 @@ def create_event(ws_config, device_name, agent_type, event_type, event_parameter
|
|
|
115
114
|
|
|
116
115
|
def get_event_details(ws_config, event_id):
|
|
117
116
|
|
|
118
|
-
ws_result = WebServiceResult(0, '', '', '', None)
|
|
117
|
+
ws_result = ActionStreamer.WebService.API.WebServiceResult(0, '', '', '', None)
|
|
119
118
|
|
|
120
119
|
try:
|
|
121
120
|
method = "GET"
|
|
@@ -125,7 +124,7 @@ def get_event_details(ws_config, event_id):
|
|
|
125
124
|
headers = {}
|
|
126
125
|
body = ''
|
|
127
126
|
|
|
128
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
127
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
129
128
|
|
|
130
129
|
ws_result.http_response_code = response_code
|
|
131
130
|
ws_result.http_response_string = response_string
|
|
@@ -133,7 +132,7 @@ def get_event_details(ws_config, event_id):
|
|
|
133
132
|
|
|
134
133
|
except Exception as ex:
|
|
135
134
|
ws_result.code = -1
|
|
136
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
135
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
137
136
|
if filename is not None and line_number is not None:
|
|
138
137
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
139
138
|
print(ex)
|
|
@@ -144,7 +143,7 @@ def get_event_details(ws_config, event_id):
|
|
|
144
143
|
|
|
145
144
|
def update_event(ws_config, event_id, event_status, result, process_id, tag_string='', tag_number=0, attempt_number=1):
|
|
146
145
|
|
|
147
|
-
ws_result = WebServiceResult(0, '', '', '', None)
|
|
146
|
+
ws_result = ActionStreamer.WebService.API.WebServiceResult(0, '', '', '', None)
|
|
148
147
|
|
|
149
148
|
try:
|
|
150
149
|
method = "PUT"
|
|
@@ -164,7 +163,7 @@ def update_event(ws_config, event_id, event_status, result, process_id, tag_stri
|
|
|
164
163
|
|
|
165
164
|
body = json.dumps(json_post_data)
|
|
166
165
|
|
|
167
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
166
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
168
167
|
|
|
169
168
|
ws_result.http_response_code = response_code
|
|
170
169
|
ws_result.http_response_string = response_string
|
|
@@ -172,7 +171,7 @@ def update_event(ws_config, event_id, event_status, result, process_id, tag_stri
|
|
|
172
171
|
|
|
173
172
|
except Exception as ex:
|
|
174
173
|
ws_result.code = -1
|
|
175
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
174
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
176
175
|
if filename is not None and line_number is not None:
|
|
177
176
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
178
177
|
print(ex)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
import ActionStreamer
|
|
3
|
+
import ActionStreamer.CommonFunctions
|
|
4
|
+
import ActionStreamer.WebService.API
|
|
4
5
|
|
|
5
6
|
def create_file(ws_config: ActionStreamer.Config.WebServiceConfig, device_name: str, filename: str, file_size: int, sha256_hash: str) -> tuple[int, str, str, int]:
|
|
6
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
import ActionStreamer
|
|
3
|
+
import ActionStreamer.CommonFunctions
|
|
4
4
|
from ActionStreamer import CommonFunctions
|
|
5
5
|
from ActionStreamer.WebService.API import WebServiceResult
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ def create_health(ws_config, device_name, health_json):
|
|
|
23
23
|
|
|
24
24
|
body = json.dumps(json_post_data)
|
|
25
25
|
|
|
26
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
26
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
27
27
|
|
|
28
28
|
ws_result.http_response_code = response_code
|
|
29
29
|
ws_result.http_response_string = response_string
|
|
@@ -57,7 +57,7 @@ def update_health(ws_config, device_name, health_json):
|
|
|
57
57
|
|
|
58
58
|
body = json.dumps(json_post_data)
|
|
59
59
|
|
|
60
|
-
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
60
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
61
61
|
|
|
62
62
|
ws_result.http_response_code = response_code
|
|
63
63
|
ws_result.http_response_string = response_string
|
|
@@ -65,7 +65,7 @@ def update_health(ws_config, device_name, health_json):
|
|
|
65
65
|
|
|
66
66
|
except Exception as ex:
|
|
67
67
|
ws_result.code = -1
|
|
68
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
68
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
69
69
|
if filename is not None and line_number is not None:
|
|
70
70
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
71
71
|
print(ex)
|
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/LogMessage/LogMessage.py
RENAMED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
-
import ActionStreamer
|
|
5
|
-
|
|
6
|
-
from ActionStreamer.WebService.API import WebServiceResult
|
|
4
|
+
import ActionStreamer.CommonFunctions
|
|
5
|
+
|
|
7
6
|
|
|
8
7
|
def create_log_message(log_config, message, log_to_console=True):
|
|
9
8
|
|
|
10
9
|
try:
|
|
11
10
|
if (log_to_console):
|
|
12
|
-
CommonFunctions.
|
|
11
|
+
ActionStreamer.CommonFunctions.log_to_console(message, log_config.agentName)
|
|
13
12
|
|
|
14
13
|
utc_now = datetime.datetime.now(datetime.timezone.utc)
|
|
15
14
|
post_data = {"deviceSerial":log_config.device_name, "agentType":log_config.agent_type, "agentVersion":log_config.agent_version, "agentIndex":log_config.agent_index, "processID":log_config.process_id, "message":message, "logDate": utc_now}
|
|
@@ -21,11 +20,11 @@ def create_log_message(log_config, message, log_to_console=True):
|
|
|
21
20
|
parameters = ''
|
|
22
21
|
body = json.dumps(post_data)
|
|
23
22
|
|
|
24
|
-
response_code, response_string = CommonFunctions.send_signed_request(log_config.ws_config, method, url, path, headers, parameters, body)
|
|
23
|
+
response_code, response_string = ActionStreamer.CommonFunctions.send_signed_request(log_config.ws_config, method, url, path, headers, parameters, body)
|
|
25
24
|
|
|
26
25
|
except Exception as ex:
|
|
27
26
|
|
|
28
|
-
filename, line_number = CommonFunctions.get_exception_info()
|
|
27
|
+
filename, line_number = ActionStreamer.CommonFunctions.get_exception_info()
|
|
29
28
|
if filename is not None and line_number is not None:
|
|
30
29
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
31
30
|
print(ex)
|
|
File without changes
|
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/CommonFunctions/Wifi/__init__.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
|
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/Health/__init__.py
RENAMED
|
File without changes
|
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/LogMessage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.2.18 → actionstreamer-0.2.20}/ActionStreamer/WebService/VideoClip/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|