Skip to content bot in Python for webhook
Branch: master
Clone or download

Latest commit

Latest commit 06eb3b7 Jun 23, 2015


Type Name Latest commit message Commit time
Failed to load latest commit information.
slackweb fix url Jun 22, 2015
.gitignore .gitignore Jun 21, 2015
MANIFEST.ini remove requirements.txt and update Jun 21, 2015

Slack Bot for WebHook

Very simple slack client by using incoming-webhook.

How to install

To install slack-python-webhook, simply:

$ sudo pip install slackweb

or from source:

$ sudo python install

Getting started

Get a token of slack webhook on slack page.


> import slackweb
> slack = slackweb.Slack(url="")

In case that you want to send a simple message:

> slack.notify(text="Maguro is a sushi")

In case that you want to send a custom message:

> slack.notify(text="Tako is a sushi", channel="#sushi", username="sushi-bot", icon_emoji=":sushi:")

If you want to use richly-formatted massages:

> attachments = []
> attachment = {"title": "Sushi", "pretext": "Sushi _includes_ gunkanmaki", "text": "Eating *right now!*", "mrkdwn_in": ["text", "pretext"]}
> attachments.append(attachment)
> slack.notify(attachments=attachments)

More detail description of message formatting, refer according pages:

You can’t perform that action at this time.