Skip to content

Matthiti/slack-cli-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-cli-webhook

Version 0.1.8

A Python package for sending messages to Slack

Requirements

Note: This guide assumes that only one Python version is installed, namely Python 3.x, and that the executables are python and pip. In case Python 3.x is installed as python3 (for example, when Python 2.x is installed as python), the keywords python and pip need to be replaced by python3 and pip3 respectively.

Installation

To install with pip, run

pip install slack-cli-webhook

Alternatively, the package can be installed from source:

python3 -m pip install --user --upgrade setuptools wheel
git clone https://github.com/Matthiti/slack-cli-webhook.git
cd slack-cli-webhook
python3 setup.py install

Usage

Help

To get an idea of how to use this tool, you can use -h or --help:

python -m slack-cli-webhook --help
usage: python -m slack-cli-webhook [-h] -m MESSAGE -w WEBHOOK

optional arguments:
  -h, --help            show this help message and exit
  -m MESSAGE, --message MESSAGE
                        message to send
  -w WEBHOOK, --webhook WEBHOOK
                        webhook to send to

Send a message

A message can be specified with the -m or --message properties. Note that characters needs to be properly escaped. In addition to the message, a webhook needs to be provided to send the message to using -w or --webhook.

python -m slack-cli-webhook -m "Test" -w "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages