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

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

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.

Source Distribution

slackinformer-0.0.2.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

slackinformer-0.0.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file slackinformer-0.0.2.tar.gz.

File metadata

  • Download URL: slackinformer-0.0.2.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for slackinformer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c04b65218558d6f46c428dbf03bdcc6372d8b58217995408d27b98dc610d38c7
MD5 27b5934877913e493fc08f0ebf8bccfe
BLAKE2b-256 cc9da0f29915b6ab78851a101810e4cf189a6bb0fae6882ee9c08f67e28c9d57

See more details on using hashes here.

File details

Details for the file slackinformer-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: slackinformer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for slackinformer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a0667b06ead1da748985f1aac55e129184e11d0c98d399b20c9050195d20b5db
MD5 de8063f0b9fcabcf8352f72736a8a917
BLAKE2b-256 b2d47b53bfd96b8b8f8f32b7987b19f7eadc1b1ba833782a72222ae5e1bac9ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page