Skip to content

carlcortright/slack-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Slack Webhook

Build Status

A simple python package for posting messages to slack channels.

Use cases

Slack webhooks are an easy way to get push notifications on mobile and desktop.

At Foundry Group we are using this package to push news about our portfolio companies to a slack channel dedicated to portfolio company news.

Personally, I am using this package to push notifications about my AI trading algorithms to a personal slack channel (trade/price updates etc.).

Installing

Install with pip:

pip install slackwebhook

Usage

First, create a slack webhook to the channel you want, and save the url.

To post a simple update to slack using the url you just generated:

import slackwebhook

mywebhook = slackwebhook("<my webhook url>")
mywebhook.post("Testing simple text post")

To post rich-text posts:

import slackwebhook

mywebhook = slackwebhook("<my webhook url>")
mywebhook.rich_format_post(fallback="Full rich format test", text="Full rich format test", pretext="Checkout this cool thing:", title="Cool Stuff!", value="Here's some more info", short=False, color="#000000")

Credits

Thanks to Peter Downs for his awesome tutorial about how to publish to pypi.

© Carl Cortright 2016

About

Easy python package for posting to slack channels

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages