python slack notification? code example
Example 1: slack send message python
import os
import slack
slack_token = os.environ["SLACK_API_TOKEN"]
client = slack.WebClient(token=slack_token)
client.chat_postMessage(
channel="C0XXXXXX",
text="Hello from your app! :tada:"
)
Example 2: slack notification pytthon
import os
import slack_notifications as slack
slack.ACCESS_TOKEN = 'xxx'
slack.send_notify('channel-name', username='Bot', text='@channel This is test message')