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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phial_slack-0.12.1.tar.gz
  • Upload date:
  • Size: 14.6 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.12.1.tar.gz
Algorithm Hash digest
SHA256 5f5f5eab88de40d2d87fdbb63ec016ccc1f3073bf3e482141131788f2fa2689a
MD5 ebdd54b7e1a9501c589f104e0158362c
BLAKE2b-256 4d6a4076000802daeaac796635f1e9fd3338d340ec17af93fd002d4cdc8247d4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: phial_slack-0.12.1-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.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 535971b26b42f668c0b518666390ea2bc6fbfdbf08e368ee1bb77691d9010bde
MD5 3c129dadda5bfad4f508ef42b2df2719
BLAKE2b-256 6a2547f0f27cce2dbf762dcc616abdd57ab87e8fe7ea544e1db5e91c0fcaf869

See more details on using hashes here.

Provenance

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