Metadata-Version: 2.1
Name: slack-invoker
Version: 0.1.2
Summary: Invoke Python functions from Slack
Home-page: https://github.com/doc-ai/slack_invoker
Author: Doc.ai
Author-email: neeraj@doc.ai
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
Requires-Dist: astroid (==2.1.0)
Requires-Dist: bleach (==3.1.0)
Requires-Dist: certifi (==2018.11.29)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: docutils (==0.14)
Requires-Dist: idna (==2.8)
Requires-Dist: isort (==4.3.4)
Requires-Dist: lazy-object-proxy (==1.3.1)
Requires-Dist: mccabe (==0.6.1)
Requires-Dist: pkginfo (==1.5.0.1)
Requires-Dist: Pygments (==2.3.1)
Requires-Dist: pylint (==2.2.2)
Requires-Dist: readme-renderer (==24.0)
Requires-Dist: requests (==2.21.0)
Requires-Dist: requests-toolbelt (==0.9.1)
Requires-Dist: six (==1.12.0)
Requires-Dist: slackclient (==1.3.0)
Requires-Dist: tqdm (==4.30.0)
Requires-Dist: twine (==1.12.1)
Requires-Dist: typed-ast (==1.1.0)
Requires-Dist: urllib3 (==1.24.1)
Requires-Dist: webencodings (==0.5.1)
Requires-Dist: websocket-client (==0.54.0)
Requires-Dist: wrapt (==1.10.11)

# slack_invoker
Invoke Python functions from Slack

## Installation

```
pip3 install slack_invoker
```

## Using the library

`slack_invoker` currently only supports the creation of Slack bot users via the RTM API.

The [sample_bot](./sample_bot) shows how you can set up a simple bot user which accepts messages
when it is mentioned, parses the messages using an
[`argparse`](https://docs.python.org/3/library/argparse.html) argument parser, passes these
arguments to a Python function, and displays the result in Slack.

The Slack documentation has more information on [how to create a bot user](https://get.slack.help/hc/en-us/articles/115005265703-Create-a-bot-for-your-workspace).

The sample bot requires you to export your `Bot User OAuth Access Token` (provided on
[https://api.slack.com](https://api.slack.com) once you create the bot user) as the
`SLACK_BOT_USER_ACCESS_TOKEN` environment variable.


