/slack-sansio

Python (a)sync Slack API library

Primary LanguagePythonMIT LicenseMIT

Python (a)sync Slack API library

Documentation Status

Travis-ci status

PyPI status

Coverage status

Installation

Slack-sansio is available on PyPI.

$ pip3 install slack-sansio  # No specific implementation requirements
$ pip3 install slack-sansio[requests]   # Requests implementation requirements
$ pip3 install slack-sansio[aiohttp]    # Aiohttp implementation requirements
$ pip3 install slack-sansio[curio]      # Curio implementation requirements
$ pip3 install slack-sansio[trio]       # Trio implementation requirements
$ pip3 install slack-sansio[treq]       # Treq implementation requirements
$ pip3 install slack-sansio[full]       # All implementations requirements

Quickstart

For more examples see the examples folder.

I/O Implementations

Most people would want to use one of these implementations directly. For those that have an HTTP library which is not supported this library provide the base tools to ease the use of the Slack API.

The library also provide an abstract base class on which to built I/O implementation.

Changelog

0.5.1

  • Allow testing without installing sync I/O requirements

0.5.0 ` * Support for new slack request signing (sansio.validate_request_signatureandexceptions.InvalidSlackSignature) 0.4.2` * Support incoming action of typemessage_action0.4.1` * Support incoming action of typedialog_submission. 0.4.0` * Support sending json for selected slack methods. 0.3.5` * Addsubtypeargument toevents.MessageRouter.register. * Fix routing bug for message withtext=None. 0.3.4` * Refactor tests * Create pytest plugin with useful fixtures. 0.3.3` * Addminimum_timeargument toSlackAPI.iterin order to force a minimum elapsed time between two call to the API 0.3.2` * Add conversation & dialog methods in Enum. * Fixnot_authedwhen using rate limit retry. 0.3.1` * Bugfix foractions.Actionandactions.Router. * Bugfix in data serialization for response urlshttps://hooks.slack.com/. 0.3.0` * Bugfix forcommands.Router. * Newevents.MessageRouterforevents.Messagerouting based on regular expression. * Renameevents.Routertoevents.EventRouter. * ChangeTypeErrortoValueErrorinevents.EventRouter.register. * Bugfix for threaded messages. 0.2.2` * Fix routing bug inevents.Router. * Inherit fromExceptioninstead ofBaseExecptionin custom exceptions. 0.2.1` * Curio support (query and iterate) * Trio support (query and iterate) * Twisted support (query only) 0.2.0` * Enum of slack API methods 0.1.0` * Initial beta release * RTM API * Pagination 0.0.1```

  • Initial development release