wmill 1.461.1__tar.gz → 1.462.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {wmill-1.461.1 → wmill-1.462.1}/PKG-INFO +1 -1
- {wmill-1.461.1 → wmill-1.462.1}/pyproject.toml +1 -1
- {wmill-1.461.1 → wmill-1.462.1}/wmill/client.py +11 -0
- {wmill-1.461.1 → wmill-1.462.1}/README.md +0 -0
- {wmill-1.461.1 → wmill-1.462.1}/wmill/__init__.py +0 -0
- {wmill-1.461.1 → wmill-1.462.1}/wmill/py.typed +0 -0
- {wmill-1.461.1 → wmill-1.462.1}/wmill/s3_reader.py +0 -0
- {wmill-1.461.1 → wmill-1.462.1}/wmill/s3_types.py +0 -0
@@ -708,6 +708,13 @@ class Windmill:
|
|
708
708
|
Indeed, in the viewer context WM_USERNAME is set to the username of the viewer but WM_EMAIL is set to the email of the creator of the app.
|
709
709
|
"""
|
710
710
|
return self.get(f"/w/{self.workspace}/users/username_to_email/{username}").text
|
711
|
+
|
712
|
+
|
713
|
+
def send_teams_message(self, conversation_id: str, text: str, success: bool = True, card_block: dict = None):
|
714
|
+
"""
|
715
|
+
Send a message to a Microsoft Teams conversation with conversation_id, where success is used to style the message
|
716
|
+
"""
|
717
|
+
return self.post(f"/teams/activities", json={"conversation_id": conversation_id, "text": text, "success": success, "card_block": card_block})
|
711
718
|
|
712
719
|
|
713
720
|
def init_global_client(f):
|
@@ -1068,6 +1075,10 @@ def request_interactive_slack_approval(
|
|
1068
1075
|
dynamic_enums_json=dynamic_enums_json,
|
1069
1076
|
)
|
1070
1077
|
|
1078
|
+
@init_global_client
|
1079
|
+
def send_teams_message(conversation_id: str, text: str, success: bool, card_block: dict = None):
|
1080
|
+
return _client.send_teams_message(conversation_id, text, success, card_block)
|
1081
|
+
|
1071
1082
|
@init_global_client
|
1072
1083
|
def cancel_running() -> dict:
|
1073
1084
|
"""Cancel currently running executions of the same script."""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|