Send updates to Slack about your pipeline’s progression!

You can upload a file, image, or send a message to a slack channel once you’ve gone through Slack to generate an API KEY.

The bot you create (if you choose that route) must be invited to the channel you post from the bot in.

After generating an apikey, it’s best to create a configuration file so that you can easily keep up with your apikey. Make sure to practice secure methods. Don’t upload your apikey to github as that is very insecure. Keep a local copy of your key.


Import the class and set up the slack handler

from OrthoEvol.Tools.slackify import Slackify

slack = Slackify(slackconfig='path/to/slackconfig.cfg')

Your config file should look as such:

slack = apikeystring

Get all users and channels

slack.list_users() # Returns a list of all users.
slack.list_channels() # Returns a list of channels

Upload a file

The file can be an image, pdf, doc, text, python file, etc