A slack helper library to get history (messages and replies) of a channel
Project description
Slack History
A Slack helper library to get the history (messages and replies) of a channel
Installation
pip install slackhistory
Quick start
import asyncio
from slackhistory import SlackHelper
from slackhistory.type.slack_types import SlackMessageAndReply
from os import environ
async def main():
slack_helper = SlackHelper(token=environ.get("TOKEN", ""))
# end_date is optional
message_and_replies: SlackMessageAndReply = await slack_helper.get_message_and_replies(
"alex-playground", start_date="2023-10-28 08:00:00", end_date="2023-11-4 22:00:00")
# the result can be converted to dict or json
print(message_and_replies.to_dict())
print(message_and_replies.to_json())
if __name__ == "__main__":
asyncio.run(main())
Example Result: example_result.json
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slackhistory-0.3.5.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file slackhistory-0.3.5.tar.gz
.
File metadata
- Download URL: slackhistory-0.3.5.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7915c85b977d70314e3c439b21b5d7e7f8ecbbe329408bfabde42afd1476dff3 |
|
MD5 | 7ca2cb266a5f3af3504fb4f95cac4167 |
|
BLAKE2b-256 | a513b329002887f9d3d1d29f26438bb3baa44005f645f597e516481e06486fdc |
File details
Details for the file slackhistory-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: slackhistory-0.3.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65bdf3aa28b757c8c2040c53f0acc075e117627c4820d9a7fdf979a0d80d7877 |
|
MD5 | 6a3a2ee392390d2b9b8d886e530e6fe3 |
|
BLAKE2b-256 | 49ef1d4750ba8f8ecfead378c0dcc4d4a14d34633fd0434678969721d42779d2 |