slack-webhook is a python client library for slack api Incoming Webhooks on Python 3.6 and above.
$ pip install slack-webhook from slack_webhook import Slack slack = Slack(url='https://hooks.slack.com/services/T00/B00/XXX') slack.post(text="Hello, world.")from slack_webhook import Slack slack = Slack(url='https://hooks.slack.com/services/T00/B00/XXX') slack.post(text="Robert DeSoto added a new task", attachments = [{ "fallback": "Plan a vacation", "author_name": "Owner: rdesoto", "title": "Plan a vacation", "text": "I've been working too hard, it's time for a break.", "actions": [ { "name": "action", "type": "button", "text": "Complete this task", "style": "", "value": "complete" }, { "name": "tags_list", "type": "select", "text": "Add a tag...", "data_source": "static", "options": [ { "text": "Launch Blocking", "value": "launch-blocking" }, { "text": "Enhancement", "value": "enhancement" }, { "text": "Bug", "value": "bug" } ] } ] }] )For help getting started with Incoming Webhooks, view our online documentation.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request