An open API service indexing awesome lists of open source software.

https://github.com/joegasewicz/slack-messages

Slack messages made easy. Send slack messages to channels from you backend api etc.
https://github.com/joegasewicz/slack-messages

Last synced: 3 months ago
JSON representation

Slack messages made easy. Send slack messages to channels from you backend api etc.

Awesome Lists containing this project

README

          

# slack-messages
Slack messages made easy. Send slack messages to channels from you backend api etc.

## install
```bash
pip install slack-messages
```

## Examples
Send a message
```bash
from slack_messages import SlackMessages

slack = SlackMessages("")
res = slack.send_message(channel_name="my-chan", message="Hello!")
```

### Errors
```bash
from slack_messages import SlackMessages, ErrorPostingMessage, ErrorFetchingChannels
try:
slack = SlackMessages("")
res = slack.send_message(channel_name="my-chan", message="Hello!")
except (ErrorFetchingChannels, ErrorPostingMessage) as err:
# handle errors
```