An API wrapper with Slack written in Python.
Key feature
- Modern Pythonic API using
asyncandawait. - API and interactive components of the platform by utilizing websockets.
Document for slack.py
How to install
⚠️ If you have slack_bolt installed, you cannot import this package. You may have file conflicts.
# stable
$ pip install wsslack.py
# latest
$ pip install git+https://github.com/peco2282/slack.py
Example
Event References
import slack
client = slack.Client(
user_token="...",
bot_token="...",
token="..."
)
@client.event
async def on_message(message: slack.Message):
if message.content.startswith("!"):
await message.channel.send("Hello.")
@client.event
async def on_channel_create(channel: slack.Channel):
await channel.send("Hello!")
client.run()
on_message
on_channel_create
Commands usage.
New style of messaging. If you use app with commands..
from slack import commands
bot = commands.Bot(..., prefix="!")
@bot.command(name="msg")
async def message(ctx: commands.Context, *args):
await ctx.channel.send("message received!")
@bot.command()
async def ping(ctx: commands.Context, *args):
await ctx.channel.send("pong!")
Metadata
Release files for wsslack.py 1.4.4
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 |
|---|---|---|---|---|
| wsslack.py-1.4.4.tar.gz | 33.0 kB | Without provenance | Details for wsslack.py-1.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wsslack.py-1.4.4-py3-none-any.whl | Python 3 | none | any | Details for wsslack.py-1.4.4-py3-none-any.whl |
Total release size: 76.4 kB
Release files / wsslack.py-1.4.4.tar.gz
| Download URL | wsslack.py-1.4.4.tar.gz |
|---|---|
| Size | 33.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c6d33c89e1e1e9a3560e301fdfe5c5c9a7887043e8f1af3a57b77ee6a24809c
|
|
BLAKE2b-256 checksum How to use checksums |
21890b2fcca908d43d288e7d1bba6d701ab1d80e60f2a67a134d649c48ae58b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Release files / wsslack.py-1.4.4-py3-none-any.whl
| Download URL | wsslack.py-1.4.4-py3-none-any.whl |
|---|---|
| Size | 43.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6168638b16d968c0d78720930853dee7664fd3989b2ec8e95d2fa6927c4714d3
|
|
BLAKE2b-256 checksum How to use checksums |
fd44901b62d4e0bdad6f37c046301bd8b400212aae1884e125b976bc8c786dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Security for wsslack.py 1.4.4
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.