Skip to content

hfwang/slacksocket

 
 

Repository files navigation

Slacksocket

Documentation Status

Slacksocket is a 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 in the docs/ folder or at http://slacksocket.readthedocs.org/en/latest/

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%