Skip to main content

(a)sync Slack API library

Project description

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

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.

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

Changelog

dev

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slack-sansio-0.3.1.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slack_sansio-0.3.1-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file slack-sansio-0.3.1.tar.gz.

File metadata

  • Download URL: slack-sansio-0.3.1.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for slack-sansio-0.3.1.tar.gz
Algorithm Hash digest
SHA256 25be6f267721ab0e8700c66fabac0440ccf146f0346a7ee68a654df707d58155
MD5 a6c44e7427e88707f458806dbaf8a055
BLAKE2b-256 787a5794ac63ff3bef3165efe57c814effe46d2627b95eb9b0adfdfb8c900131

See more details on using hashes here.

File details

Details for the file slack_sansio-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for slack_sansio-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc63a82aebf9c9d76aaa98c031c15d57d40e27fac51292e4cb613dbd1581e30
MD5 f248ccf4818ac1aa5f3b4b0e7e6f4324
BLAKE2b-256 c5f063a00c7c5a1953602c654ce00eb74c77a733f76000730f34e1c88ba71617

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page