sandesh


Namesandesh JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/abhishekkrthakur/sandesh
Summarysandesh - a simple app to send messages on slack
upload_time2022-12-17 09:32:44
maintainer
docs_urlNone
authorAbhishek Thakur
requires_python>=3.7
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
 +-+-+-+-+-+-+-+
 |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.

### Installing

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

```
git clone git@github.com:abhishekkrthakur/sandesh.git
cd sandesh
python setup.py install
```

Or from pip:

```
pip install sandesh
```

### Usage

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.send(msg)
```

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)
    ])
sandesh.send(log)
```

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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/abhishekkrthakur/sandesh",
    "name": "sandesh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Abhishek Thakur",
    "author_email": "",
    "download_url": "",
    "platform": "linux",
    "description": "\n +-+-+-+-+-+-+-+\n |s|a|n|d|e|s|h|\n +-+-+-+-+-+-+-+\n\nsandesh (\u0938\u0902\u0926\u0947\u0936) in Hindi means message. \nThis is a simple python library to send messages to Slack using webhook urls.\n\n### Installing\n\nYou can install the bleeding edge version of this library by doing:\n\n```\ngit clone git@github.com:abhishekkrthakur/sandesh.git\ncd sandesh\npython setup.py install\n```\n\nOr from pip:\n\n```\npip install sandesh\n```\n\n### Usage\n\nUsing sandesh is very easy.\n\nFirst of all you need a webhook. You can either keep this webhook as environment variable: `SANDESH_WEBHOOK`\nOr you can send it in the `send` function: `sandesh.send(msg, webhook=\"XXXXX\")`.\n\nI like to keep it as environment variable so that I dont accidently push it to GitHub ;)\n\nYou can send a message to the provided webhook by doing:\n\n```\nimport sandesh\n\nloss = 0.15\nmsg = f\"Training loss was {loss}\"\nsandesh.send(msg)\n```\n\nsandesh also supports dictionaries, OrderedDict and defaultdict. An example for OrderedDict is provided below:\n\n```\nimport collections\nimport sandesh\n\nlog = collections.OrderedDict([\n        ('training_epoch', 5),\n        ('loss', 0.08)\n    ])\nsandesh.send(log)\n```\n\nIf you want to go fancy, take a look at custom messages for slack. You can create your own custom message and send using:\n\n```\nimport sandesh\n\n# data = Fancy slack json\nsandesh.send(data, use_raw=True)\n```\n\n\nThis is a simple app that I use to send me notifications of my training processes from home workstation or AWS/GCP machines.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "sandesh - a simple app to send messages on slack",
    "version": "0.3.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "f1643b62b6745d3288c2cbd639eb374e",
                "sha256": "33e5c35e40ca7c879c88180b5bd222d0a31a557e193cfbae012be95b2a7e13e0"
            },
            "downloads": -1,
            "filename": "sandesh-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f1643b62b6745d3288c2cbd639eb374e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3916,
            "upload_time": "2022-12-17T09:32:44",
            "upload_time_iso_8601": "2022-12-17T09:32:44.251555Z",
            "url": "https://files.pythonhosted.org/packages/0b/3e/cdacda5a2fcf690860edb37c15603d82431bdedeb11d9ee36dd171473898/sandesh-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-17 09:32:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "abhishekkrthakur",
    "github_project": "sandesh",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sandesh"
}
        
Elapsed time: 0.06620s