Created
July 1, 2021 08:14
-
-
Save wonderbeyond/f90a14ef82561f99dd10e1ca13019345 to your computer and use it in GitHub Desktop.
Do remote log from slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
webhook_url = "<your-slack-webhook-url>" | |
def slack_log(message, webhook_url=webhook_url): | |
requests.post( | |
webhook_url, | |
json={"text": message} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment