An open API service indexing awesome lists of open source software.

https://github.com/hlee-ai/slackle

Slackle — Slackle up your Slack ✨ Fast. Flexible. Fun.
https://github.com/hlee-ai/slackle

fastapi framework slack slack-app slack-bot

Last synced: 5 months ago
JSON representation

Slackle — Slackle up your Slack ✨ Fast. Flexible. Fun.

Awesome Lists containing this project

README

          






Slackle



Slackle Framework
PyPI Version
Slack + FastAPI
Python Version

---

## ✨ Slackle up your Slack!

[**Slackle**](https://slackle.dev) is a lightweight and magical framework for building Slack apps effortlessly.

[→ Visit the Official Website](https://slackle.dev)

---

## 🚀 Features

- ⚡️ **Slash command routing** — Handle `/your-command`, `/like`, `/magic`
- 💬 **Event handling** — `@app_mention`, `message`, `reaction_added`, etc.
- 🎨 **Slack formatting** — Clean markdown and block formatting made easy
- 🧩 **Plugin system** — Extend functionality with decorators and custom plugins
- ⚙️ **FastAPI + Slack SDK** — Built on proven tools, superfast and flexible

---

## 📦 Installation

```bash
pip install slackle
```

---

## 🧑‍💻 Getting Started

```python
import os

from slackle import Slackle, SlackleConfig
from slackle.utils.slack import get_user_mention

# Set up slackle configuration
config = SlackleConfig(
app_token=os.getenv("APP_TOKEN"),
verification_token=os.getenv("VERIFICATION_TOKEN")
)

# Initialize slackle app
app = Slackle(config=config)

# Add handler for message events
@app.on_event("message")
async def say_hello(slack, user_id, channel_id):
mention = get_user_mention(user_id)
print("User ID:", user_id)
await slack.send_message(
channel=channel_id,
message=f"Hello {mention}!",
)

# Add handler for /say slash command
@app.on_command("/say")
async def say_something(slack, text, user_id, channel_id):
name = await slack.get_user_name(user_id)
await slack.send_message(
channel=channel_id,
message=f"{name} said: {text}",
)
```

---

> 📁 See [examples/](examples) for more code samples.

## 🤝 Contribution

We welcome contributions!
Check out the [Contributing Guide](CONTRIBUTING.md) to get started.

---

## 🪪 License

MIT License. See the [LICENSE](LICENSE) file for details.