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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phial_slack-0.11.1.tar.gz
  • Upload date:
  • Size: 14.3 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.1.tar.gz
Algorithm Hash digest
SHA256 dbf25c36c6d6bbcf7e035cd8441340d08958775163a1240be7b33e2f326fed3f
MD5 287f380b74a6d74f816ad5ba438d7aa8
BLAKE2b-256 127520a330b8bbca22193a9598d6b7e952c0bbc399d542ad3eb860afd4790e26

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: phial_slack-0.11.1-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.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b37321d94c279ac3b222e4e411df4c9cc8ae42437eba896e2ab7eb45caa65537
MD5 5a255d86fba58d134b9eea48fe1083e5
BLAKE2b-256 395d2cb91cd3db1d6f465ce07bb21242e03b4ccb5f8d39e4172c942bec3a92ce

See more details on using hashes here.

Provenance

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