Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Simple Slack interface

Project description


A decorator which is called using:'the text to watch for')

...that watches a specified Slack channel for new Slack message posts whose ['text'] value is equivalent to the provided string argument

Requires Python 3.7


pip install slacktory

For this decorator to work, you must first create a Slack App

Then create a file in your project's root directory with the following content:

name = '<your Slack channel name>'
channel = '<your Slack channel id>'
token = '<your Slack API token>'
webhook = '<your Slack channel webhook>'

All of the above information can be obtained when setting up your Slack App

Usage example

>>> import slacktory
>>>'do the thing') # the decorator 
>>> def the_thing():

        # do something here...

In the above example, the_thing() will be called once the decorator has detected the text 'do the thing' in a new Slack message in the Slack channel (specified in

Release History

  • 1.0.0
    • first release
  • 1.0.1
    • minor README changes
  • 1.0.2
    • minor README changes
  • 1.0.3
    • use nonlocal variables to remove the need for a recursive call on decorated function
    • remove polling, add while True
  • 1.0.4
    • Add try/except with error message for import local_settings
    • Add license copy
  • 1.0.5
    • add exception handling


James Coleman –

Distributed under the MIT license. See LICENSE for more information.


  1. Fork it (
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Project details

Download files

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

Files for slacktory, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size slacktory-1.0.5-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size slacktory-1.0.5.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page