Skip to main content

A simple wrapper around the Slack web api to post messages

Project description

Simple wrapper around the Slack Web API to post messages.


Slackelot contains a single function:
send_message(message, webhook_url, pretext='', title='', author_name='', color=None)

webhook_url should be in the following format: ''


from slackelot import send_message

webhook_url = ''
message = 'Who wants to push the pram?\n@lancelot @percival'
pretext = 'Knights of the Round Table'
title = 'Spamelot'
author_name = 'Arthur'
color = '#663399'

send_message(message, webhook_url, pretext=pretext, title=title, author_name=author_name, color=color)

Extra Goodness

Paid teams have the option to mention other subteams, (ie. channel). In that case, you might append something like this to your message:

'\n<!subteam^ID|HANDLE>' (replace ID and HANDLE with your subteam’s id and name, respectively).

For more information on message formatting, see the Slack API docs

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slackelot, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size slackelot-0.0.4.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page