Skip to main content

A Slack bot framework

Project description

Documentation Status Github Actions Coverage Status PyPi

A lightweight 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):
    '''A command with an 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:

  • Decorator based 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


Download files

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

Source Distribution

phial_slack-0.13.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phial_slack-0.13.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file phial_slack-0.13.0.tar.gz.

File metadata

  • Download URL: phial_slack-0.13.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phial_slack-0.13.0.tar.gz
Algorithm Hash digest
SHA256 9997725ba723fc024bc716e6a82c9d7b58f6f65a207cfca3f1b8c14b7fa714a4
MD5 b79b90845a4dad6c857576d9bef93e4a
BLAKE2b-256 a1eea66606e887fa90f7cf21d4a1f1b4e3d206da287f73eab0fd663094588913

See more details on using hashes here.

Provenance

The following attestation bundles were made for phial_slack-0.13.0.tar.gz:

Publisher: cd.yml on sedders123/phial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phial_slack-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: phial_slack-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phial_slack-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a00e95a4dd8a2258b123c3935489b9e83cbf2a06707be8474175bc78deabad73
MD5 defa4f0845e37970ac996180c09ed6c9
BLAKE2b-256 b97e5e2665ad6f9cfcca1458206b25db26a3880035b4498f77164dcce28ed66b

See more details on using hashes here.

Provenance

The following attestation bundles were made for phial_slack-0.13.0-py3-none-any.whl:

Publisher: cd.yml on sedders123/phial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page