Skip to main content

Asynchronous Slack API integration.

Project description

/əˈslæk/

PyPI Version Travis Build Status Code Coverage Code Issues ISC License

aSlack is a lightweight, asynchronous wrapper for Slack’s Web and Real-Time Messaging (RTM) APIs, designed to allow the easy development of Slack tools and bots in Python. It defines two principal components:

  • SlackApi - a wrapper around the Web API; and

  • SlackBot - a messaging bot built on top of the RTM API.

Compatibility

aSlack uses asyncio with the async and await syntax, so is only compatible with Python versions 3.5 and above.

Dependencies

Asynchronous HTTP and WebSocket functionality is provided by aiohttp (version 0.15 and above required for out-of-the-box WebSocket client support).

Documentation

aSlack’s documentation is available on PythonHosted.

Installation

aSlack is available through the Python Package Index, PyPI, you can install it with:

pip install aslack

Alternatively, clone or fork the repository and use e.g.:

python setup.py develop

to install locally for development. In this case, you should also install the development dependencies (ideally in a virtualenv) using:

pip install -r requirements.txt

Testing

The test suite can be run using py.test directly or by running:

python setup.py test

in which case pylint will also be run to check the code quality.

Additionally, a demo test for the Halliwell example can be run by setting the environment variable TMDB_API_TOKEN.

Examples

See the /examples directory for examples of the kinds of bots that you can build with aSlack.

Halliwell

Based on both aSlack and aTMDb, Halliwell is a bot that can provide information on movies or actors and find overlaps. Two environment variables, SLACK_API_TOKEN and TMDB_API_TOKEN, are required to run this example, and configuration for easy deployment to Cloud Foundry is provided.

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

aslack-0.7.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

aslack-0.7.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file aslack-0.7.1.tar.gz.

File metadata

  • Download URL: aslack-0.7.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for aslack-0.7.1.tar.gz
Algorithm Hash digest
SHA256 f692d35c6975aea750cb6939087e0ea347ddc7af521965c8a280a13329ea45de
MD5 3c858622a86b14694d8ee3898e85f39e
BLAKE2b-256 10e0a6e116797b68a0639cdf7ce7f095f42d5e635a1ac3e452ca9289a7a10464

See more details on using hashes here.

File details

Details for the file aslack-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aslack-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26bf4ea3cb6dc24d4e06bec64d03fbc95e80361badddd2b706a2e9642d12684b
MD5 ff965d41097e4fa0806b3f4e0b5cb5fd
BLAKE2b-256 9e84bd39eebbc1c28b3b9a733ce34b149e08f1161b8c6e4b162dd1122aba200b

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