Skip to content

Commit 7808f44

Browse files
authored
Merge pull request #4 from cloudquery/sdk-update
update sdk
2 parents c213b83 + 7423cbb commit 7808f44

File tree

5 files changed

+312
-328
lines changed

5 files changed

+312
-328
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
venv
2-
__pycache__
2+
__pycache__
3+
dist

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Python Source Plugin Template
2+
3+
This is the plugin documentation that will get published to Hub. Read more about publishing at [CloudQuery Docs](https://docs.cloudquery.io/docs/developers/publishing-a-plugin-to-the-hub)

plugin/plugin.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212

1313
PLUGIN_NAME = "example"
1414
PLUGIN_VERSION = "1.0.0" # {x-release-please-version}
15+
TEAM_NAME = "cloudquery"
16+
PLUGIN_KIND = "source"
1517

1618

1719
class ExamplePlugin(plugin.Plugin):
1820
def __init__(self) -> None:
19-
super().__init__(PLUGIN_NAME, PLUGIN_VERSION)
21+
super().__init__(
22+
PLUGIN_NAME, PLUGIN_VERSION, plugin.plugin.Options(team=TEAM_NAME, kind=PLUGIN_KIND)
23+
)
2024
self._spec_json = None
2125
self._spec = None
2226
self._scheduler = None
@@ -26,10 +30,10 @@ def __init__(self) -> None:
2630
def set_logger(self, logger) -> None:
2731
self._logger = logger
2832

29-
def init(self, spec_bytes, no_connection: bool = False):
33+
def init(self, spec, no_connection: bool = False):
3034
if no_connection:
3135
return
32-
self._spec_json = json.loads(spec_bytes)
36+
self._spec_json = json.loads(spec)
3337
self._spec = Spec(**self._spec_json)
3438
self._spec.validate()
3539
self._scheduler = Scheduler(

0 commit comments

Comments
 (0)