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.2.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.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phial_slack-0.12.2.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.2.tar.gz
Algorithm Hash digest
SHA256 922da7e9edb14a5d82e644faa707670c4e2e517c8273e9dc67a546e6a79f8e0c
MD5 f0879e6644db6ec003e687964fa9a1af
BLAKE2b-256 247c04dc0071b4e203863dc316b225f85aa6f98a5f5997ac21eec6537a2895bb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: phial_slack-0.12.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9665f876c22194c7866142c451ca8fe028aa3651207af71bfe45007d152223
MD5 b92c1dc8a100c960f46d1f1e6c9ce808
BLAKE2b-256 93ec9b37258a2b55eec0ad0c93de4cd06c436df73d8b8a74aa7806d6d4cd5eca

See more details on using hashes here.

Provenance

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