omnata-plugin-runtime 0.6.7a176__tar.gz → 0.6.9__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/omnata_plugin.py +22 -3
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/LICENSE +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/README.md +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -15,7 +15,7 @@ else:
|
|
15
15
|
# Python 3.8 and below
|
16
16
|
from typing_extensions import Annotated
|
17
17
|
|
18
|
-
|
18
|
+
import zipfile
|
19
19
|
import datetime
|
20
20
|
import http
|
21
21
|
import json
|
@@ -1296,7 +1296,7 @@ class InboundSyncRequest(SyncRequest):
|
|
1296
1296
|
]
|
1297
1297
|
for datetime_property in datetime_properties:
|
1298
1298
|
try:
|
1299
|
-
if datetime_property in data:
|
1299
|
+
if datetime_property in data and data[datetime_property] is not None:
|
1300
1300
|
data[datetime_property] = parse(
|
1301
1301
|
data[datetime_property]
|
1302
1302
|
).isoformat()
|
@@ -2552,4 +2552,23 @@ def find_udf_functions(path:str = '.') -> List[UDFDefinition]:
|
|
2552
2552
|
description='The connection object, obtained from calling PLUGIN.PLUGIN_CONNECTION.')] + udf_obj.params
|
2553
2553
|
matching_classes.append(udf_obj)
|
2554
2554
|
|
2555
|
-
return matching_classes
|
2555
|
+
return matching_classes
|
2556
|
+
|
2557
|
+
def get_static_file_contents(relative_path:str) -> bytes:
|
2558
|
+
"""
|
2559
|
+
Retrieve file packaged with this plugin, by extracting it from the zip file.
|
2560
|
+
The relative path will be relative to the root of the src folder of the plugin.
|
2561
|
+
"""
|
2562
|
+
# this file will be inside the zip file, so we can find it by looking at the path of this file
|
2563
|
+
full_path_to_this = os.path.abspath(__file__)
|
2564
|
+
split_position = full_path_to_this.find('app.zip')
|
2565
|
+
if split_position == -1:
|
2566
|
+
with open(relative_path, 'rb') as f:
|
2567
|
+
return f.read()
|
2568
|
+
# Add the length of 'app.zip' to split just after it
|
2569
|
+
split_position += len('app.zip')
|
2570
|
+
|
2571
|
+
path_to_zip = full_path_to_this[:split_position]
|
2572
|
+
with zipfile.ZipFile(path_to_zip, 'r') as z:
|
2573
|
+
with z.open(relative_path, 'r') as f:
|
2574
|
+
return f.read()
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/forms.py
RENAMED
File without changes
|
{omnata_plugin_runtime-0.6.7a176 → omnata_plugin_runtime-0.6.9}/src/omnata_plugin_runtime/logging.py
RENAMED
File without changes
|
File without changes
|
File without changes
|