wmill 1.461.1__py3-none-any.whl → 1.462.0__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.
wmill/client.py CHANGED
@@ -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."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.461.1
3
+ Version: 1.462.0
4
4
  Summary: A client library for accessing Windmill server wrapping the Windmill client API
5
5
  Home-page: https://windmill.dev
6
6
  License: Apache-2.0
@@ -1,8 +1,8 @@
1
1
  wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
2
- wmill/client.py,sha256=8N1zUQ59FHLiQQ63x490dt7FbhJOOKPxmUlKjLO7rr8,39080
2
+ wmill/client.py,sha256=7HjoCicawaXZORUJHVzagJgUuexWKfj21lG_8JMDAKQ,39696
3
3
  wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
4
4
  wmill/s3_reader.py,sha256=izHlg2Xsg0Sr_LkDDEC35VuEijJcuPBDIm-xj21KsgU,1668
5
5
  wmill/s3_types.py,sha256=XVjPyc5sjWesTy6nnRReojhyPgPsaT0EY3X57mWUaJ4,1173
6
- wmill-1.461.1.dist-info/METADATA,sha256=YiVoL4e0h_Jd_JzYZpw7iEfgAOoezmr1I5Mf9hN9xZE,2693
7
- wmill-1.461.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
8
- wmill-1.461.1.dist-info/RECORD,,
6
+ wmill-1.462.0.dist-info/METADATA,sha256=N4a9iSFWn1EZRU-dA597CLC45J0AgcTMIi1kUAzRbNE,2693
7
+ wmill-1.462.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
8
+ wmill-1.462.0.dist-info/RECORD,,