Skip to main content

sandesh - a simple app to send messages on slack

Project description

+-+-+-+-+-+-+-+ |s|a|n|d|e|s|h| +-+-+-+-+-+-+-+

sandesh (संदेश) in Hindi means message. This is a simple python library to send messages to Slack using webhook urls.


You can install the bleeding edge version of this library by doing:

git clone
cd sandesh
python install

Or from pip:

pip install sandesh


Using sandesh is very easy.

First of all you need a webhook. You can either keep this webhook as environment variable: SANDESH_WEBHOOK Or you can send it in the send function: sandesh.send(msg, webhook="XXXXX").

I like to keep it as environment variable so that I dont accidently push it to GitHub ;)

You can send a message to the provided webhook by doing:

import sandesh

loss = 0.15
msg = f"Training loss was {loss}"

sandesh also supports dictionaries, OrderedDict and defaultdict. An example for OrderedDict is provided below:

import collections
import sandesh

log = collections.OrderedDict([
        ('training_epoch', 5),
        ('loss', 0.08)

If you want to go fancy, take a look at custom messages for slack. You can create your own custom message and send using:

import sandesh

# data = Fancy slack json
sandesh.send(data, use_raw=True)

This is a simple app that I use to send me notifications of my training processes from home workstation or AWS/GCP machines.

In case of any doubts/troubles, feel free to contact me:

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 sandesh, version 0.21
Filename, size File type Python version Upload date Hashes
Filename, size sandesh-0.21-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sandesh-0.21.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

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