A sexy, simple, yet powerful and extendable Slack bot
Project description
Slack Machine
Slack Machine is a sexy, simple, yet powerful and extendable Slack bot. More than just a bot, Slack Machine is a framework that helps you develop your Slack team into a ChatOps powerhouse.
Warning
As of v0.24.0 Python 3.6 support has been dropped. Python 3.6 is EOL on 2021-12-23, which is 3 weeks from now at the time of writing (2021-12-1). I just switched to a new Macbook Pro M1 on which I cannot build and test for Python 3.6 easily anymore, so I'm dropping support.
This does not mean that Slack Machine won't work with Python 3.6 anymore. For now, there are no specific features being used from Python 3.7 or higher.
Features
- Get started with mininal configuration
- Built on top of the Slack RTM API for smooth, real-time interactions
- Support for rich interactions using the Slack Web API
- High-level API for maximum convenience when building plugins
- Low-level API for maximum flexibility
Plugin API features:
- Listen and respond to any regular expression
- Capture parts of messages to use as variables in your functions
- Respond to messages in channels, groups and direct message conversations
- Respond with Emoji
- Respond in threads
- Respond with ephemeral messages
- Send DMs to any user
- Support for message attachments
- Support for blocks
- Listen and respond to any Slack event supported by the RTM API
- Store and retrieve any kind of data in persistent storage (currently Redis and in-memory storage are supported)
- Schedule actions and messages
- Emit and listen for events
- Help texts for Plugins
- Built in web server for webhooks
Coming Soon
- Support for Interactive Buttons
- ... and much more
Installation
You can install Slack Machine using pip:
$ pip install slack-machine
It is strongly recommended that you install slack-machine
inside a
virtual environment!
Usage
- Create a directory for your Slack Machine bot:
mkdir my-slack-bot && cd my-slack-bot
- Add a
local_settings.py
file to your bot directory:touch local_settings.py
- Create a Bot User for your Slack team: https://my.slack.com/services/new/bot (take note of your API token)
- Add the Slack API token to your
local_settings.py
like this:
SLACK_API_TOKEN = 'xox-my-slack-token'
- Start the bot with
slack-machine
- ...
- Profit!
Documentation
You can find the documentation for Slack Machine here: https://dandydev.github.io/slack-machine/
Go read it to learn how to properly configure Slack Machine, write plugins, and more!
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
Hashes for slack_machine-0.24.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd38b99eae9d23a0b7dcf6b432054a85ce87d136c0eaa3066803325955fbb04 |
|
MD5 | 5a16190da42b37a1026ce877be32ff4b |
|
BLAKE2b-256 | 2b61249221a75eb49c186c3b562eee490feee4459b60cd3a1d1c334a1d4069fb |