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
export SLACK_CLIENT_API_KEY=<YOUR_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
plot_path = os.path.join("output", "map_epoch_plot.png")
- Send message
send_slack_message(content, plot_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slackinformer-0.0.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for slackinformer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df4a5339e64bff639f615dd27c2cefdbd3b4e4db0eec03b40a0137a8f88f48c |
|
MD5 | 38dff0a6e02159f232dd138957b3cc82 |
|
BLAKE2b-256 | 7bc841410cf93f347fe86025437014acc49dd28e487a2048c729f70f5dd9e305 |