omnata-plugin-runtime 0.1.20__py3-none-any.whl → 0.1.22__py3-none-any.whl

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.
@@ -10,7 +10,6 @@ from pydantic import BaseModel,Field # pylint: disable=no-name-in-module
10
10
  from typing import Optional, Dict, List, Literal, Union
11
11
  from .rate_limiting import ApiLimits, RateLimitState
12
12
  from .configuration import InboundSyncStreamsConfiguration, OutboundSyncStrategy, StoredConfigurationValue, StoredMappingValue
13
- from .omnata_plugin import PluginManifest
14
13
 
15
14
  class PluginMessageCurrentActivity(BaseModel):
16
15
  """
@@ -98,15 +97,3 @@ class InboundApplyPayload(BaseModel):
98
97
  latest_stream_state:Dict
99
98
 
100
99
  ApplyPayload = Annotated[Union[OutboundApplyPayload,InboundApplyPayload],Field(discriminator='sync_direction')]
101
-
102
- class PluginInfo(BaseModel):
103
- """
104
- Manifest plus other derived information about a plugin which is determined during upload.
105
- """
106
- manifest: PluginManifest
107
- anaconda_packages:List[str]
108
- bundled_packages:List[str]
109
- icon_source: Optional[str]
110
- plugin_class_name: str
111
- transformer_class_name: Optional[str]
112
- package_source: Literal['function','stage']
@@ -10,12 +10,13 @@ import pandas
10
10
  import jinja2
11
11
  from functools import wraps, partial
12
12
  from abc import ABC, abstractmethod
13
- from typing import Callable, Dict, Iterable, List, Literal, Type
13
+ from typing import Callable, Dict, Iterable, List, Literal, Optional, Type
14
14
  import threading, datetime, json, queue
15
15
  from logging import getLogger
16
16
  from dateutil.parser import parse
17
17
  from jinja2 import Environment
18
18
  import pydantic
19
+ from pydantic import BaseModel
19
20
  from snowflake.snowpark import Session
20
21
  from snowflake.snowpark.functions import col, lit, parse_json, is_null, not_
21
22
  from snowflake.connector.pandas_tools import write_pandas
@@ -46,6 +47,19 @@ class PluginManifest(SubscriptableBaseModel):
46
47
  supports_inbound:bool
47
48
  supported_outbound_strategies:List[OutboundSyncStrategy]
48
49
 
50
+ class PluginInfo(BaseModel):
51
+ """
52
+ Manifest plus other derived information about a plugin which is determined during upload.
53
+ """
54
+ manifest: PluginManifest
55
+ anaconda_packages:List[str]
56
+ bundled_packages:List[str]
57
+ icon_source: Optional[str]
58
+ plugin_class_name: str
59
+ transformer_class_name: Optional[str]
60
+ package_source: Literal['function','stage']
61
+
62
+
49
63
  def jinja_filter(func):
50
64
  """
51
65
  This annotation designates a function as a jinja filter.
@@ -169,7 +169,7 @@ class PluginEntrypoint():
169
169
  logger.info(f"Calling apply_results_queue")
170
170
  inbound_sync_request.apply_results_queue()
171
171
  omnata_log_handler.flush()
172
- return_dict["streams"] = dict(streams_list)
172
+ return_dict["streams"] = [s.dict() for s in streams_list]
173
173
  # we need to calculate counts for:
174
174
  # CHANGED_COUNT by counting up the records in INBOUND_STREAM_RECORD_COUNTS
175
175
  logger.info('Finished applying records')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.1.20
3
+ Version: 0.1.22
4
4
  Summary: A development kit to assist with building, testing and publishing Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -1,13 +1,13 @@
1
1
  omnata_plugin_runtime/__init__.py,sha256=piQOo_Y0VwAdP2nME0J53yey06In4MgfBFbH7R1OJkA,1213
2
- omnata_plugin_runtime/api.py,sha256=k7N-GgUGmF-mP6VStV2aTAVOFdyIpbSZ4dt2BEyevDM,4609
2
+ omnata_plugin_runtime/api.py,sha256=gt04Ee5hanI3nJH--ygh8FNbRLBpvHdZ_BPQ1mB-2LI,4187
3
3
  omnata_plugin_runtime/configuration.py,sha256=ApmDhTG7TqURiQ5VCkfP8QY8rT5K9pQIdKi6qJurDnQ,29524
4
4
  omnata_plugin_runtime/forms.py,sha256=LZwztBBzoKdvsSccZ0ZKC7Edkml5e6buTpgJKkC1VTc,12646
5
5
  omnata_plugin_runtime/logging.py,sha256=LnLVqwaxzf81XAxtKPHwrr56yfsWvK-GYlsuk27xQ2c,4134
6
- omnata_plugin_runtime/omnata_plugin.py,sha256=vgctOfGdlUioU7KcEMAZ2cdhAaXB4uoMD3_73LJ1DFQ,64513
7
- omnata_plugin_runtime/plugin_entrypoints.py,sha256=nXkP8iSUNfzx52gGDruzv4D4TayRqgTv7osk7S-b-4w,18382
6
+ omnata_plugin_runtime/omnata_plugin.py,sha256=0hA9Xdo_edWHdH7mX-jVF127IErr21lZED31erivdV4,64935
7
+ omnata_plugin_runtime/plugin_entrypoints.py,sha256=8OM43cqQjF4-axBR5nZ8-EvAO8ryoHJDQQVuQMx6AIc,18396
8
8
  omnata_plugin_runtime/rate_limiting.py,sha256=wxjKF26cMyCRdkCdTytC-mXwJFgsMze-PJttiND9c8g,10078
9
9
  omnata_plugin_runtime/record_transformer.py,sha256=oDUHurMQl6ixsltBaZf6ngPxtoizcaS21LuxKMxlaxY,2611
10
- omnata_plugin_runtime-0.1.20.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
11
- omnata_plugin_runtime-0.1.20.dist-info/METADATA,sha256=_0-kAP4kjIzEZk9fDXNQzh3gYWNbnih-OznI0Lrp3_0,853
12
- omnata_plugin_runtime-0.1.20.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
13
- omnata_plugin_runtime-0.1.20.dist-info/RECORD,,
10
+ omnata_plugin_runtime-0.1.22.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
11
+ omnata_plugin_runtime-0.1.22.dist-info/METADATA,sha256=qQmOHKBQU8fPvbwkRAb81lHIF2agPtrJOqUOrFe-qD4,853
12
+ omnata_plugin_runtime-0.1.22.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
13
+ omnata_plugin_runtime-0.1.22.dist-info/RECORD,,