omnata-plugin-runtime 0.5.7a139__tar.gz → 0.5.7a140__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/omnata_plugin.py +23 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/LICENSE +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/README.md +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.5.7-
|
3
|
+
version = "0.5.7-a140"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -2232,13 +2232,24 @@ def get_nested_value(nested_dict:Dict, keys:List[str]):
|
|
2232
2232
|
|
2233
2233
|
@dataclass
|
2234
2234
|
class SnowflakeFunctionParameter:
|
2235
|
+
"""
|
2236
|
+
Represents a parameter for a Snowflake UDF or UDTF
|
2237
|
+
"""
|
2235
2238
|
name: str
|
2236
2239
|
description: str
|
2237
2240
|
data_type: str
|
2238
2241
|
default_value_clause: Optional[str] = None
|
2239
2242
|
|
2243
|
+
def __str__(self):
|
2244
|
+
if self.default_value_clause:
|
2245
|
+
return f"{self.name} {self.data_type} default {self.default_value_clause}"
|
2246
|
+
return f"{self.name} {self.data_type}"
|
2247
|
+
|
2240
2248
|
@dataclass
|
2241
2249
|
class SnowflakeUDTFResultColumn:
|
2250
|
+
"""
|
2251
|
+
Represents a result column for a Snowflake UDTF
|
2252
|
+
"""
|
2242
2253
|
name: str
|
2243
2254
|
data_type: str
|
2244
2255
|
description: str
|
@@ -2248,6 +2259,9 @@ def consumer_udtf(
|
|
2248
2259
|
description: str,
|
2249
2260
|
params: List[SnowflakeFunctionParameter],
|
2250
2261
|
result_columns: List[SnowflakeUDTFResultColumn]):
|
2262
|
+
"""
|
2263
|
+
A decorator for a class which should be automatically exposed to the consumer as a UDTF
|
2264
|
+
"""
|
2251
2265
|
def class_decorator(cls):
|
2252
2266
|
# Get the original 'process' method from the class
|
2253
2267
|
original_process = getattr(cls, 'process')
|
@@ -2304,6 +2318,9 @@ def consumer_udtf(
|
|
2304
2318
|
return class_decorator
|
2305
2319
|
|
2306
2320
|
def find_consumer_udtf_classes(path:str = '.'):
|
2321
|
+
"""
|
2322
|
+
Finds all classes in the specified directory which have the 'consumer_udtf' decorator applied
|
2323
|
+
"""
|
2307
2324
|
# Get the directory's absolute path
|
2308
2325
|
current_dir = os.path.abspath(path)
|
2309
2326
|
|
@@ -2328,6 +2345,9 @@ def consumer_udf(
|
|
2328
2345
|
description: str,
|
2329
2346
|
params: List[SnowflakeFunctionParameter],
|
2330
2347
|
result_data_type: str):
|
2348
|
+
"""
|
2349
|
+
A decorator for a function which should be automatically exposed to the consumer as a UDF
|
2350
|
+
"""
|
2331
2351
|
def decorator(func):
|
2332
2352
|
sig = signature(func)
|
2333
2353
|
function_params = sig.parameters
|
@@ -2374,6 +2394,9 @@ def consumer_udf(
|
|
2374
2394
|
return decorator
|
2375
2395
|
|
2376
2396
|
def find_consumer_udf_functions(path:str = '.'):
|
2397
|
+
"""
|
2398
|
+
Finds all functions in the specified directory which have the 'consumer_udf' decorator applied
|
2399
|
+
"""
|
2377
2400
|
# Get the current directory's absolute path
|
2378
2401
|
current_dir = os.path.abspath(path)
|
2379
2402
|
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.5.7a139 → omnata_plugin_runtime-0.5.7a140}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|