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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-dingtalk
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: A dagster plugin for the DingTalk
5
5
  Author: YiZixuan
6
6
  Author-email: sqkkyzx@qq.com
@@ -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 DingTalkOp
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
- @experimental
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 op_send_simple_text(context: OpExecutionContext, text, at):
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="@列表,传List[str]解析为userId,传List[int]解析为phone,传ALL解析为全部。")
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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dagster-dingtalk"
3
- version = "0.1.15"
3
+ version = "0.1.16"
4
4
  description = "A dagster plugin for the DingTalk"
5
5
  authors = ["YiZixuan <sqkkyzx@qq.com>"]
6
6
  readme = "README.md"
@@ -1 +0,0 @@
1
- __version__ = "0.1.15"