Main Classes

class slackly.SlackAPI(bind=None)

The API object

Parameters:bind – Optional. The client to bind to this API object.
class slackly.SlackClient(token=None, base_url='', user_agent=None, response_factory=<class 'slackly.client.response_factory.SlackAPIDictResponse'>, include_api=True, raise_for_status=True)

The web client

  • token – Required. A str slack token
  • base_url – Optional. A str base url for slack
  • user_agent – Optional. A user agent string. leave this blank unless you know what you are doing
  • response_factory – A response factory (gets __call__’ed on every response)
  • raise_for_status – Indicates whether a non 200 http status code cause a python exception
class slackly.SlackRTMClient(token, url, event_factory=<function SlackEventDict>, client=None, keep_alive=True, ignore_pong=True, donotdie=True)

The RTM Client

  • token – A str token
  • url – A str the base url for slack
  • event_factory – A class to process events coming off the real time messaging api
  • client – A slackly.SlackClient or None.
  • keep_alive – The option to have the websocket automatically written to at least every 3 seconds
  • ignore_pong – Whether to emit or squash the response to pings