SlackSocket is a Python interface to the Slack Real Time Messaging(RTM) API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
slacksocket
.gitignore
LICENSE
README.md
docs-requirements.txt
mkdocs.yml
requirements.txt
setup.cfg
setup.py

README.md

Slacksocket

Documentation Status PyPI version

Python interface to the Slack Real Time Messaging(RTM) API

Install

pip install slacksocket

Usage

Retrieving events/messages

from slacksocket import SlackSocket

s = SlackSocket('<slack-token>',translate=True) # translate will lookup and replace user and channel IDs with their human-readable names. default true. 

for event in s.events():
    print(event.json)

Sending messages

from slacksocket import SlackSocket

s = SlackSocket('<slack-token>')

msg = s.send_msg('Hello there', channel_name='channel-name') 
print(msg.sent)
True

Documentation

Full documentation is available on ReadTheDocs