(a)sync Slack API library
Project description
Python (a)sync Slack API library
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
import slack
import pprint
import requests
from slack.io.sync import SlackAPI
session = requests.session()
slack_client = SlackAPI(token=TOKEN, session=session)
data = client.query(slack.methods.AUTH_TEST)
pprint.pprint(data)
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.
Synchronous with request.
The library also provide an abstract base class on which to built I/O implementation.
Changelog
dev
0.3.5
Add subtype argument to events.MessageRouter.register.
Fix routing bug for message with text=None.
0.3.4
Refactor tests
Create pytest plugin with useful fixtures.
0.3.3
Add minimum_time argument to SlackAPI.iter in order to force a minimum elapsed time between two call to the API
0.3.2
Add conversation & dialog methods in Enum.
Fix not_authed when using rate limit retry.
0.3.1
Bugfix for actions.Action and actions.Router.
Bugfix in data serialization for response urls https://hooks.slack.com/.
0.3.0
Bugfix for commands.Router.
New events.MessageRouter for events.Message routing based on regular expression.
Rename events.Router to events.EventRouter.
Change TypeError to ValueError in events.EventRouter.register.
Bugfix for threaded messages.
0.2.2
Fix routing bug in events.Router.
Inherit from Exception instead of BaseExecption in 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file slack-sansio-0.3.5.tar.gz
.
File metadata
- Download URL: slack-sansio-0.3.5.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9547cf6785a0d692eb8dc08509d349dc1d8e4ed1aef55701ff24fd18cd0f1949 |
|
MD5 | 1aeb76f1b3131a8821cc539e35c7edfc |
|
BLAKE2b-256 | 6544cb9d0978078811c4c6279892ca28f117397bb797f2009ee003331fcee30a |
File details
Details for the file slack_sansio-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: slack_sansio-0.3.5-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ca779d934d1dcac0ba6db6ab11a4fd6434eb00d978ab7079a446fa483a8efc6 |
|
MD5 | b952b693374f2b0b0b2aba4a3da9d0aa |
|
BLAKE2b-256 | 8831bf35148586749f9d31d328e03c211a6dfac8a3ba72ad6d34f6b9458b0970 |