Skip to content

An integration for notifying a slack channel when running fabric commands

Notifications You must be signed in to change notification settings

jeffrand/slack-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-webhooks

Easily integrate Slack webhooks with your project.

Examples

Send a message

from slack_webhooks import SlackWebhook, SlackAttachment

webhook = SlackWebhook('https://hooks.slack.com/services/foo/bar/baz'
                       icon_emoji=':panda:')
webhook.send('Cool beans!')

Supports Attachments

attachment = SlackAttachment('Party Time!', text='Party Time',
                             title='What time is it?', color='good')
webhook.send('Cool beans!', attachment=attachment)

Decorate a function

a2 = SlackAttachment('Oh no!', text='Nooooo',
                      title='Bad things?', color='danger')
@webhook.decorate('woo', boo', success_attachment=attachment,
                  failure_attachment=a2)
def do_stuff(foo):
    print foo

About

An integration for notifying a slack channel when running fabric commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages