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.11.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

aslack-0.11.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aslack-0.11.0.tar.gz
Algorithm Hash digest
SHA256 f8f1de907fb212c6ec5d37dcc3aa5ccade904ecc8fe01c5ba9c20f8ce758282e
MD5 26ed338474ebc6f3fb2f1d93b390f377
BLAKE2b-256 8710656d91ba5cccf5775edce5d61ef2a7559f0e453861c3e1476caa1b7bc52e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aslack-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 722f75e84ca3deb03554712054d956e5a5303734360d84117af34054a5e9962a
MD5 5b2038e4309e135b48239d8422e06639
BLAKE2b-256 c429fdf2a6011b1e75bdc53f06215203e281f8be4c875fc323a5348213bdf80f

See more details on using hashes here.

Supported by

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