ActionStreamer 0.4.4__tar.gz → 0.4.6__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.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/CommonFunctions/CommonFunctions.py +1 -1
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/API/API.py +4 -4
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Event/Event.py +3 -3
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/File/File.py +8 -8
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Health/Health.py +3 -3
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/LogMessage/LogMessage.py +2 -2
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Patch/Patch.py +1 -1
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/VideoClip/VideoClip.py +12 -4
- actionstreamer-0.4.6/ActionStreamer/WebService/VideoClip/__init__.py +4 -0
- {actionstreamer-0.4.4 → actionstreamer-0.4.6}/PKG-INFO +1 -1
- {actionstreamer-0.4.4 → actionstreamer-0.4.6}/pyproject.toml +1 -1
- actionstreamer-0.4.4/actionstreamer/WebService/VideoClip/__init__.py +0 -4
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/CommonFunctions/Wifi/Wifi.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/CommonFunctions/Wifi/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/CommonFunctions/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Config/Config.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Config/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Device/Device.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Device/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Model/Model.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Model/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/API/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Event/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/File/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Health/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/LogMessage/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/Patch/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/__init__.py +0 -0
- {actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/__init__.py +0 -0
- {actionstreamer-0.4.4 → actionstreamer-0.4.6}/README.md +0 -0
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/API/API.py
RENAMED
|
@@ -2,8 +2,8 @@ import datetime
|
|
|
2
2
|
import json
|
|
3
3
|
from json import JSONEncoder
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
from
|
|
5
|
+
import actionstreamer.CommonFunctions
|
|
6
|
+
from actionstreamer.Config import WebServiceConfig
|
|
7
7
|
|
|
8
8
|
class PatchOperation:
|
|
9
9
|
|
|
@@ -40,11 +40,11 @@ def register_agent(ws_config: WebServiceConfig, device_name: str, agent_type: st
|
|
|
40
40
|
parameters = ''
|
|
41
41
|
body = json.dumps(jsonPostData)
|
|
42
42
|
|
|
43
|
-
response_code, response_string =
|
|
43
|
+
response_code, response_string = actionstreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
44
44
|
|
|
45
45
|
except Exception as ex:
|
|
46
46
|
|
|
47
|
-
filename, line_number =
|
|
47
|
+
filename, line_number = actionstreamer.CommonFunctions.get_exception_info()
|
|
48
48
|
if filename is not None and line_number is not None:
|
|
49
49
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
50
50
|
print(ex)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
from actionstreamer import CommonFunctions
|
|
4
|
+
from actionstreamer.WebService.API import WebServiceResult
|
|
5
|
+
from actionstreamer.Config import WebServiceConfig
|
|
6
6
|
|
|
7
7
|
def get_pending_event_list(ws_config: WebServiceConfig, device_name: str) -> WebServiceResult:
|
|
8
8
|
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/File/File.py
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
from
|
|
3
|
+
import actionstreamer.CommonFunctions
|
|
4
|
+
import actionstreamer.WebService.API
|
|
5
|
+
from actionstreamer.Config import WebServiceConfig
|
|
6
6
|
|
|
7
|
-
def create_file(ws_config:
|
|
7
|
+
def create_file(ws_config: actionstreamer.Config.WebServiceConfig, device_name: str, filename: str, file_size: int, sha256_hash: str) -> tuple[int, str, str, int]:
|
|
8
8
|
|
|
9
9
|
"""
|
|
10
10
|
Create a file.
|
|
@@ -33,7 +33,7 @@ def create_file(ws_config: ActionStreamer.Config.WebServiceConfig, device_name:
|
|
|
33
33
|
parameters = ''
|
|
34
34
|
body = json.dumps(json_post_data)
|
|
35
35
|
|
|
36
|
-
response_code, response_string =
|
|
36
|
+
response_code, response_string = actionstreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
37
37
|
|
|
38
38
|
signed_url = ''
|
|
39
39
|
file_id = 0
|
|
@@ -48,7 +48,7 @@ def create_file(ws_config: ActionStreamer.Config.WebServiceConfig, device_name:
|
|
|
48
48
|
|
|
49
49
|
except Exception as ex:
|
|
50
50
|
|
|
51
|
-
filename, line_number =
|
|
51
|
+
filename, line_number = actionstreamer.CommonFunctions.get_exception_info()
|
|
52
52
|
|
|
53
53
|
if filename is not None and line_number is not None:
|
|
54
54
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
@@ -74,11 +74,11 @@ def update_file_upload_success(ws_config: WebServiceConfig, device_name: str, fi
|
|
|
74
74
|
parameters = ''
|
|
75
75
|
body = json.dumps(json_post_data)
|
|
76
76
|
|
|
77
|
-
response_code, response_string =
|
|
77
|
+
response_code, response_string = actionstreamer.CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters, body)
|
|
78
78
|
|
|
79
79
|
except Exception as ex:
|
|
80
80
|
|
|
81
|
-
filename, line_number =
|
|
81
|
+
filename, line_number = actionstreamer.CommonFunctions.get_exception_info()
|
|
82
82
|
if filename is not None and line_number is not None:
|
|
83
83
|
print(f"Exception occurred at line {line_number} in {filename}")
|
|
84
84
|
print(ex)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
from actionstreamer import CommonFunctions
|
|
4
|
+
from actionstreamer.WebService.API import WebServiceResult
|
|
5
|
+
from actionstreamer.Config import WebServiceConfig
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def create_health(ws_config: WebServiceConfig, device_name: str, health_json: str) -> WebServiceResult:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from actionstreamer import CommonFunctions
|
|
5
|
+
from actionstreamer.Config import LogConfig
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def create_log_message(log_config: LogConfig, message: str, log_to_console=True) -> tuple[int, str]:
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
3
|
+
from actionstreamer import CommonFunctions
|
|
4
|
+
from actionstreamer.Config import WebServiceConfig
|
|
5
|
+
from actionstreamer.WebService.API import WebServiceResult
|
|
6
|
+
from actionstreamer.WebService.Patch import *
|
|
7
|
+
from actionstreamer.Model import VideoClip
|
|
7
8
|
|
|
8
9
|
def create_video_clip(ws_config: WebServiceConfig, device_name: str, video_clip: VideoClip) -> tuple[int, str]:
|
|
9
10
|
|
|
@@ -57,8 +58,11 @@ def update_file_id(ws_config: WebServiceConfig, video_clip_id: int, file_id: int
|
|
|
57
58
|
|
|
58
59
|
return response_code, response_string
|
|
59
60
|
|
|
61
|
+
|
|
60
62
|
def get_video_clip_by_id(ws_config: WebServiceConfig, video_clip_id: int) -> tuple[int, str]:
|
|
61
63
|
|
|
64
|
+
ws_result = WebServiceResult(0, '', '', '', None)
|
|
65
|
+
|
|
62
66
|
try:
|
|
63
67
|
|
|
64
68
|
method = "GET"
|
|
@@ -69,6 +73,10 @@ def get_video_clip_by_id(ws_config: WebServiceConfig, video_clip_id: int) -> tup
|
|
|
69
73
|
|
|
70
74
|
response_code, response_string = CommonFunctions.send_signed_request(ws_config, method, url, path, headers, parameters)
|
|
71
75
|
|
|
76
|
+
ws_result.http_response_code = response_code
|
|
77
|
+
ws_result.http_response_string = response_string
|
|
78
|
+
ws_result.json_data = json.loads(response_string)
|
|
79
|
+
|
|
72
80
|
except Exception as ex:
|
|
73
81
|
|
|
74
82
|
filename, line_number = CommonFunctions.get_exception_info()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Config/Config.py
RENAMED
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Config/__init__.py
RENAMED
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Device/Device.py
RENAMED
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Device/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/Model/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.4.4/actionstreamer → actionstreamer-0.4.6/ActionStreamer}/WebService/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|