Skip to main content

Informs Slack for sth.

Project description

Sending Slack Messages

  • Install python library

pip install slackinformer

  • Export Slack API Key Environment Variable as SLACK_CLIENT_API_KEY


  • Import slackinformer module.

from slackinformer.slackinformer import send_slack_message

  • Create content to be sent. For example:

content = "YOLOv3 - Last Mean Average Precision(mAP) - Epoch(" + epoch + "): " + "*" + mAP + "*"

  • Create plot path. Suppose plot path is: output/map_epoch_plot.png

img_path = os.path.join("output", "map_epoch_plot.png")

  • Send message

send_slack_message(channel="#general", title="Image Title" content, img_path)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slackinformer, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size slackinformer-0.0.2-py3-none-any.whl (14.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size slackinformer-0.0.2.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page