Send a chat message with Thinwrap (Python)
Post a chat message via the Thinwrap Chat facade in Python — one call shape for Slack, Discord, Teams and every other provider.
1. Install
pip install thinwrap-notifications2. Send the call
import os
from thinwrap.notifications import Chat, ChatSendInput, SlackConfig, ConnectorError
c = Chat(SlackConfig(webhook_url=os.environ["SLACK_WEBHOOK_URL"]))
try:
res = c.send(ChatSendInput(body="Deploy finished for build 1042."))
print(res.status.value, res.provider_message_id)
except ConnectorError as err:
print(f"{err.provider_code.value}: {err.provider_message}")
Same code works for all supported providers — just change the provider ID.