In [1]:
from slackclient import SlackClient

In [2]:
token = 'xoxp-35736224322-25408761871-25885176954-a866aa5254'
# this is a dummy token, please use your own token

In [3]:
sc = SlackClient(token)

In [8]:
sc.api_call("chat.postMessage", channel="#patentcloud", text="Hello from Python! :tada:",
    username='pybot', icon_emoji=':robot_face:')


Out[8]:
{u'channel': u'C0RPPHS6B',
 u'message': {u'icons': {u'emoji': u':robot_face:',
   u'image_64': u'https://slack.global.ssl.fastly.net/d4bf/img/emoji_2015_2/apple/1f916.png'},
  u'subtype': u'bot_message',
  u'text': u'Hello from Python! :tada:',
  u'ts': u'1457592163.000003',
  u'type': u'message',
  u'username': u'pybot'},
 u'ok': True,
 u'ts': u'1457592163.000003'}

In [ ]: