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.11.0.tar.gz (14.2 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.11.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for phial_slack-0.11.0.tar.gz
Algorithm Hash digest
SHA256 8554961a054776a90513fdc329f1e36b20cbf0dc2e63482aaab70f42f52ce295
MD5 e2191487fb6942b6e2a87c92339b37f3
BLAKE2b-256 9bbee66fb7a3d3e88c82e390ff4fa72b5491ea170e8bec9d41da53012f5da9a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for phial_slack-0.11.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.11.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for phial_slack-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d002b1f4914a788e94c881995e127f50fc6d173392e53d008212f0151e22110
MD5 2b85c16168813b9c46d8f15682e618a0
BLAKE2b-256 f2f4218ab3bb8e404f084789db482131faad5ce7610d0328cae564561352565e

See more details on using hashes here.

Provenance

The following attestation bundles were made for phial_slack-0.11.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