ASGI adapter for Slack Events API
Project description
SlackEvent Responder
Introduction
The SlackEvents Responder is an ASGI adapter for Slack’s Events API based on the Starlette ASGI framework and works well with the Responder.
This library provides event subscription interface, just like Flask based Slack Events API adapter, it would be easy to switch from it.
Oh, one more point, this library can handle both sync and async function for event callback :)
Installation
pip install slackevent-responder
Setup Slack App with Event Subscription
Follow the official document :)
Examples
Hello world using responder
import responder
from slackevent_responder import SlackEventApp
slack_events_app = SlackEventApp(
path="/events", slack_signing_secret=SLACK_SIGNING_SECRET
)
@slack_events_app.on("reaction_added")
def reaction_added(event_data):
event = event_data["event"]
emoji = event["reaction"]
print(emoji)
api = responder.API()
api.mount('/slack', slack_events_app)
api.run(port=3000)
More examples can be found here.
Change Logs
v0.1.0 (2020-01-17)
- Initial Release 🎉
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slackevent_responder-0.1.0.tar.gz.
File metadata
- Download URL: slackevent_responder-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.1 Darwin/19.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0357f54d6299bdedab3726789b3ae85248af911b4549d2ecd4d59bc739013025
|
|
| MD5 |
92073bd0857c1762f7936b1d5ba624d5
|
|
| BLAKE2b-256 |
305c8b697010df316d7010738bf7bdf8086a8db9fdbc1f98731fdbac457338a7
|
File details
Details for the file slackevent_responder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: slackevent_responder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.1 Darwin/19.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e750729409aa3a11d7430293daf41970e380e96312fedd3d0c0bbe3e03d2b63
|
|
| MD5 |
f086183e8fb408e2d253fe790da11cb4
|
|
| BLAKE2b-256 |
0d8d1af08ead36ebd3b090c5980f863d3d5167e157fcc03bd3da9ebe7c01c160
|