dagster-dingtalk 0.1.15__tar.gz → 0.1.16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/PKG-INFO +1 -1
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/dagster_dingtalk/__init__.py +1 -1
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/dagster_dingtalk/operations.py +5 -9
- dagster_dingtalk-0.1.16/dagster_dingtalk/version.py +1 -0
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/pyproject.toml +1 -1
- dagster_dingtalk-0.1.15/dagster_dingtalk/version.py +0 -1
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/README.md +0 -0
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/dagster_dingtalk/app_client.py +0 -0
- {dagster_dingtalk-0.1.15 → dagster_dingtalk-0.1.16}/dagster_dingtalk/resources.py +0 -0
@@ -4,6 +4,6 @@ from dagster_dingtalk.version import __version__
|
|
4
4
|
|
5
5
|
from dagster_dingtalk.resources import DingTalkAppResource, DingTalkWebhookResource
|
6
6
|
from dagster_dingtalk.app_client import DingTalkClient as DingTalkAppClient
|
7
|
-
import dagster_dingtalk.operations as
|
7
|
+
import dagster_dingtalk.operations as dingtalk_op
|
8
8
|
|
9
9
|
DagsterLibraryRegistry.register("dagster-dingtalk", __version__)
|
@@ -1,19 +1,15 @@
|
|
1
1
|
from dagster import In, OpExecutionContext, op, Out
|
2
|
-
|
3
|
-
# noinspection PyProtectedMember
|
4
|
-
from dagster._annotations import experimental
|
5
|
-
|
6
2
|
from .app_client import DingTalkClient
|
7
3
|
from .resources import DingTalkWebhookResource
|
8
4
|
|
9
|
-
|
5
|
+
|
10
6
|
@op(description="钉钉Webhook发送文本消息",
|
11
7
|
required_resource_keys={'dingtalk_webhook'},
|
12
8
|
ins={
|
13
9
|
"text": In(str),
|
14
10
|
"at": In(default_value=None, description="@列表,传List[str]解析为userId,传List[int]解析为phone,传ALL解析为全部。")
|
15
11
|
})
|
16
|
-
def
|
12
|
+
def op_send_text(context: OpExecutionContext, text, at):
|
17
13
|
webhook:DingTalkWebhookResource = context.resources.dingtalk_webhook
|
18
14
|
if isinstance(at, str) and at == 'ALL':
|
19
15
|
webhook.send_text(text=text, at_all=True)
|
@@ -29,9 +25,9 @@ def op_send_simple_text(context: OpExecutionContext, text, at):
|
|
29
25
|
@op(description="钉钉Webhook发送Markdown消息",
|
30
26
|
required_resource_keys={'dingtalk_webhook'},
|
31
27
|
ins={
|
32
|
-
"text": In(str),
|
33
|
-
"title": In(str, default_value=''),
|
34
|
-
"at": In(default_value=None, description="
|
28
|
+
"text": In(str, description="Markdown 内容"),
|
29
|
+
"title": In(str, default_value='', description="标题"),
|
30
|
+
"at": In(default_value=None, description="传 List[str] @userIds ,传 List[int] @mobiles ,传 \"ALL\" @所有人。")
|
35
31
|
})
|
36
32
|
def op_send_markdown(context: OpExecutionContext, text, title, at):
|
37
33
|
webhook:DingTalkWebhookResource = context.resources.dingtalk_webhook
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.16"
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.15"
|
File without changes
|
File without changes
|
File without changes
|