slack-sansio | (a)sync library for using Slack’s API

This project aims to provide a simple library that abstract the slack API details.

Many slack libraries already exist for Python but none oriented towards asynchronous usage. While working on Sir bot-a-lot we figured the slack client could be useful for the community and decided to take it out and create this library. We also choose to take a sans-I/O approach to allow reusability for other asynchronous frameworks.

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.

In development

Installation

slack-sansio is on PyPI

$ pip3 install slack-sansio  # No extra requirements

Due to it’s sans-I/O approach extra requirements are needed for each implementations. You can install them with:

$ pip3 install slack-sansio[requests] # requests implementation extra requirements
$ pip3 install slack-sansio[aiohttp]  # aiohttp implementation extra requirements
$ pip3 install slack-sansio[curio]    # curio implementation extra requirements
$ pip3 install slack-sansio[trio]     # trio implementation extra requirements
$ pip3 install slack-sansio[treq]     # treq implementation extra requirements
$ pip3 install slack-sansio[full]     # all implementations extra requirements

Examples

Examples are dependant of the implementations and can be found on the documentation of each implementation.

Methods

For ease of use the library provide an enum.Enum of all the slack API methods.

slack.methods

alias of slack.methods.Methods

class slack.methods.Methods[source]

Enumeration of available slack methods.

Provides iterkey and itermod for SlackAPI.iter().