Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A Slack bot framework

Project description

Documentation Status CircleCI Coverage Status

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

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.3

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
phial_slack-0.2.1-py3-none-any.whl (10.2 kB) Copy SHA256 hash SHA256 Wheel py3 Apr 9, 2018
phial-slack-0.2.1.tar.gz (7.5 kB) Copy SHA256 hash SHA256 Source None Apr 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page