A framework for Slack RTM bots.
Project description
This library provides a simple asyncio based interface for writing RTM <https://api.slack.com/rtm> bots for Slack. Many distinct functions can be run through a single Slack bot plugin, triggered by user defined commands (e.g. !myCommand).
Example
A bot which can be triggered by the message !greet Guido looks like this:
from asyncbots.bot import SlackBot, register
from asyncbots.command import MessageCommand
from pyparsing import alphas, Word
class MyBot(SlackBot)
def __init__(self):
self.name = 'My Bot'
# Match 'greet' followed by any word
self.expr = 'greet' + Word(alphas).setResultsName('user')
@register()
async def handler(self, sender, channel, parsed_message):
return MessageCommand('Hello ' + parsed_message['user'])
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asyncbots-0.1.8.linux-x86_64.tar.gz.
File metadata
- Download URL: asyncbots-0.1.8.linux-x86_64.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc0b37f127b4c7f92bbe606347b0783d2b34ddc4112747d7f6cfad9570b3501
|
|
| MD5 |
fbe08efe88be25a47eb836bfb23345e1
|
|
| BLAKE2b-256 |
d390c151db6f20d47c4a9b708b509a7bb0f1cfe71298e130e1c790e546715810
|
File details
Details for the file asyncbots-0.1.8-py3-none-any.whl.
File metadata
- Download URL: asyncbots-0.1.8-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e58d2e46722600c9429ecc72e4028be08d8ff4815577998514ff1ef17a4d9520
|
|
| MD5 |
723976941aea449847912b9bfab60004
|
|
| BLAKE2b-256 |
f74f08988c4f6766ab5300ab30f4aa6916befa87f2f7b02fd9d1169b52e1bfa0
|