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.7.tar.gz
(6.3 kB
view details)
Built Distribution
File details
Details for the file slackhistory-0.3.7.tar.gz
.
File metadata
- Download URL: slackhistory-0.3.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3295339bc1d122382c5528315afce60fe5a2aeaa074c53fad3f0bc88221c9d25 |
|
MD5 | 0b1a3f79ba8e383f564b4922e55f8e13 |
|
BLAKE2b-256 | 52342797896c82de51c9e9594b9ed1f6f5713850c845b1255bd68a23034b4fb6 |
File details
Details for the file slackhistory-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: slackhistory-0.3.7-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 276da0715fa196f11babe5af85aa33dcd5eb09116ee9de6fb13b748e11b6b33a |
|
MD5 | 9210b90c83282bb0d5ac783fa49b9db6 |
|
BLAKE2b-256 | 5ce779392a85fc29b9ad2f4fd2d341cd1bd5fd0ce53f0e8350399f1351813368 |