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