This component lets you send a message on Slack from a Lightning app.
import lightning as L
from lit_slack import SlackMessenger
class YourComponent(L.LightningFlow):
def __init__(self):
super().__init__()
self.slack_messenger = SlackMessenger(
token="a-long-token", channel_id="A03CB4A6AK7"
)
def run(self):
self.slack_messenger.send_message("hello from ⚡ lit slack ⚡")
app = L.LightningApp(YourComponent())
Use these instructions to install:
git clone https://github.com/PyTorchLightning/LAI-slack-messenger.git
cd LAI-slack-messenger
pip install -e .