sla

slackweb

Slack.com bot in Python for webhook

Showing:

Popularity

Downloads/wk

0

GitHub Stars

128

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

0

License

MIT License

Categories

Readme

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 setup.py install

Getting started

Get a token of slack webhook on slack page.

Instantiate:

> import slackweb
> slack = slackweb.Slack(url="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX")

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:

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100