A Slack bot framework
Project description
A simple framework for building slack bots
Phial is a slack bot framework, modelled loosely on flask.
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 © 2019 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
File details
Details for the file phial-slack-0.10.1.tar.gz
.
File metadata
- Download URL: phial-slack-0.10.1.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e231d7286a11a554ef2cefb9fa524dfa918eb95ea6320a55ce0fed954ea769f0 |
|
MD5 | e9d87745adc030bb45aa45600e4ebe79 |
|
BLAKE2b-256 | 3d7aaad8471bab9c597261cdb172278b11a1960ab86658278e54826c21bba2c8 |
File details
Details for the file phial_slack-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: phial_slack-0.10.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a4363a7f0c6232edfca6e8f8469ae8f5f9838206d0fa5dfd8109903f054b1d4 |
|
MD5 | 163f1af9f393554a1f84d082812d3f80 |
|
BLAKE2b-256 | ccbfb3dd980ba02710c42e6b10ef49948c5f54702ed3fa65c4f872f3a3eee7c1 |