Little helpers working with Slack bot 🤖 in Django.
Project description
django-slack-tools
Little helpers working with Slack bot 🤖 in Django.
This project aims to implementing helpful features making Slack bot and providing reusable Django apps integrated with database.
✨ Features
Key features are:
-
Reusable Django app for Slack messaging with various messaging backends for different environments
-
Database-backed Slack messaging policies with simple dictionary-based template
-
Message histories
-
Built-in admin for management working with Slack workspace
-
Celery support for messaging backends, management and shortcut tasks, etc.
-
Django template support
And more in future roadmap...
-
New Django apps and helpers for Slack features such as modals, event subscription, etc.
-
More fine working example with rich documentation
Currently it is focused on messaging features. In future, hoping to bring more helpful features across Slack Bot ecosystem, such as event subscriptions, modals, bot interactions, etc.
🚀 Installation
django-slack-tools supports Python 3.8+ and Django 4.2+. Supports for each deps will be dropped as soon as the ends of security updates.
[!WARNING] 0.x versions are for development. Breaking changes can be made at any time. If gonna use this package, recommend to pin down the version.
Install the package:
$ pip install django-slack-tools
Add the app to the your Django settings:
INSTALLED_APPS = [
...
"django.contrib.messages", # Used in admin
"django_slack_tools.slack_messages",
...
]
Add configuration for application:
DJANGO_SLACK_TOOLS = {
# Module path to Slack Bolt application or callable returns the app
"SLACK_APP": "path.to.your.slack.app",
# Messaging backend configuration
"BACKEND": {
"NAME": "django_slack_tools.slack_messages.backends.SlackBackend",
"OPTIONS": {
# TODO(#44): Reasonable defaults to reduce some duplicates
"slack_app": "path.to.your.slack.app",
}
}
}
Then, run the database migration and send messages:
from django_slack_tools.slack_messages.message import slack_message
message = slack_message(
"I like threading",
channel="id-of-channel",
header={"reply_broadcast": True},
)
Please check the documentation for more about details.
💖 Contributing
All contributions and helps are welcome. Please check the CONTRIBUTING.md file for about details.
📜 License
This project is licensed under the terms of the MIT license.
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
File details
Details for the file django_slack_tools-0.2.2.tar.gz
.
File metadata
- Download URL: django_slack_tools-0.2.2.tar.gz
- Upload date:
- Size: 302.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ef357064ef27649e3a6cf9686e99339ce5a75ce0970b8a84e55266daf127316 |
|
MD5 | 2e66a0abde4b00b140b7355ca4d44e3f |
|
BLAKE2b-256 | 2fbfa25e8958e859e9317781f4edcdaa3e74c8496f8b5faeb88a3de107597266 |
Provenance
The following attestation bundles were made for django_slack_tools-0.2.2.tar.gz
:
Publisher:
release.yaml
on lasuillard/django-slack-tools
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
django_slack_tools-0.2.2.tar.gz
- Subject digest:
3ef357064ef27649e3a6cf9686e99339ce5a75ce0970b8a84e55266daf127316
- Sigstore transparency entry: 148378041
- Sigstore integration time:
- Predicate type:
File details
Details for the file django_slack_tools-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: django_slack_tools-0.2.2-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9988ba4825a5f79018f3c611f73ce79c26e220c88c6e89bb8d71f8714d2333b5 |
|
MD5 | 5df5c1bd1e74c5f6c6dea2437995293f |
|
BLAKE2b-256 | 0072db79ad9e81bff192cf9aa9875a233c02d3f52025ee7d176759dbf05816b1 |
Provenance
The following attestation bundles were made for django_slack_tools-0.2.2-py3-none-any.whl
:
Publisher:
release.yaml
on lasuillard/django-slack-tools
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
django_slack_tools-0.2.2-py3-none-any.whl
- Subject digest:
9988ba4825a5f79018f3c611f73ce79c26e220c88c6e89bb8d71f8714d2333b5
- Sigstore transparency entry: 148378043
- Sigstore integration time:
- Predicate type: