Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Send notification to slack using channels

Project description

If you want to asyncronously send low priority messages to a Slack channel using Django Channels this is the 3rd party library for you.

Partially inspired by django-slack Adding support for channels and simplying the interface.


  1. Django 1.8+
  2. channels
  3. requests

Quick Start

Add to INSTALLED_APPS and set your slack token:

  # ...
  # ...

CHANNELS_SLACK_TOKEN = 'yourtokenhere'

You can generate a tokens here:

Add to your

from channels.routing import include
from channels_slack_notifications.routing import slack_routing

channels_routing = [

Send your first notification:

from channels import Channel

message = dict(
    text = 'this is a test',

This uses a bunch of defaults which you can override per setting, or just in the message dict.

You can use this management command to test your settings:

python test_slack_notification


CHANNELS_SL ACK_TOKEN ~~~~~~~~~~~~~~~~~~~~~~~~

Default: None

Your Slack authentication token.

You can generate a tokens here:


Default: #general

Use this setting to set a default channel of the room the message should appear in.

You can override on a per-message level by specifying channel in your message dict.


Default: bot

Use this setting to set a default name the message will appear be sent from.

You can override on a per-message level by specifying username in your message dict.


Default: :robot:

Use this setting to set a default icon emoji.

You can override on a per-message level by specifying icon_emoji in your message dict.


Default: 'channels_slack_notifications.backends.console'

A string pointing to the eventual backend class that will actually send the message to the Slack API.

Use 'channels_slack_notifications.backends.default' in product which uses the requests library.

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 channels-slack-notifications, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size channels-slack-notifications-0.0.2.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page