slack-api-decorator
Slack-API-decorator provides simple decorator to receive slack-payload: Slash Command and Event Subscription.
install
$ pip install slackapidecorator
usage
Slash Command
from slack_api_decorator import SlashCommand
sc = SlashCommand(app_name="sample")
@sc.add(command="/example")
def accept_example(params):
return params
sc.execute(params={"payload from": "slack"})
Event Subscription
The events below are supported:
file_uploadmessagereaction_added
from slack_api_decorator import EventSubscription
event_subscription = EventSubscription(app_name="sample")
@event_subscription.add(event_type="file_upload")
def file_upload_example(params):
return params
@event_subscription.add("reaction_added", channel_id="Uxxxxxxxx")
def reaction_added_in_channel(params):
return params
event_subscription.execute(params={"payload from": "slack"})
Metadata
Release files for slackapidecorator 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slackapidecorator-0.2.0.tar.gz | 8.7 kB | Without provenance | Details for slackapidecorator-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slackapidecorator-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for slackapidecorator-0.2.0-py3-none-any.whl |
Total release size: 19.9 kB
Release files / slackapidecorator-0.2.0.tar.gz
| Download URL | slackapidecorator-0.2.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25d1c4113bebc2729d10452e50f73ec19f25e822b2779d39b135c2ccbba9ae67
|
|
BLAKE2b-256 checksum How to use checksums |
5d8a0fba49719e1c66ab808fcf2a79dc18a934075f82630cef563ad888dc7f89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Release files / slackapidecorator-0.2.0-py3-none-any.whl
| Download URL | slackapidecorator-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b7331de98cb8c056e182e0d53da3d10bd8c02f3ccff958760128122088f94c6
|
|
BLAKE2b-256 checksum How to use checksums |
ed421b5d8e2ca1cd8ec3d842edaf970aaa0d7462c77a5b60dbbc4325f5ce930d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Security for slackapidecorator 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.