A Slack bot framework
Project description
A simple framework for building slack bots
Phial is a slack bot framework, modelled loosely on flask.
NOTE: This package is still in early development, things are likely to change
Table of Contents
Usage
Python:
from phial import Phial, command, Response
bot = Phial('---slack token here---')
@bot.command('greet <name>')
def greet(name):
'''Simple command with argument which replies to a message'''
return "Hello {0}".format(name)
bot.run()
Slack:
By default the bot requires a prefix of ! before its commands. This can be changed in the config.
youruser: > !greet jim bot: > Hello Jim
Features:
Simple command definition
Send messages to slack
Reply to messages in a thread
Reply to messages with a reaction
Upload Files
Examples of commands utilising these features can be found in the examples folder
Install
$ pip install phial-slack
Contribute
If a feature is missing, or you can improve the code please submit a PR or raise an Issue
Licenses
phial - MIT © 2017 James Seden Smith
Erlenmeyer Flask by Iconic from the Noun Project - CC BY 3.0 (used in examples/phial.png)
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 phial_slack-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8f3f6d0939ac1670982fb204675c47b08696e7670b4008a6f62510749529b3 |
|
MD5 | f6dc06eaf0354a098806d51016f3c14b |
|
BLAKE2b-256 | 3b0e1da324d0c7850adb8e492b863518cf0ca42fa73057b5c8c650d0fa1e4de8 |