Skip to main content

Slack tools.

Project description

islack

Tools package for slack.

install

pip install islack

demo

from islack import slack_incoming

slack_incoming_url = "your_slack_incoming_url"

slack_incoming(
    slack_incoming_url,
    channel="#temp",
    username="iSlackRobot",
    icon_url="https://s3-us-west-2.amazonaws.com/slack-files2/bot_icons/2019-08-12/723294116148_48.png",
    pretext="This pretest content is a [<https://slack.com|slack>] incoming test!",
    color="#cd0000",
    title="This is *title*!",
    value="This is _first_ line.\n This is _second_ line."
)

# or

payload = {
    "channel": "#everyone",
    "username": "iSlackIncoming",
    "icon_url": "https://ca.slack-edge.com/TJ2D8P5T8-USLACKBOT-sv41d8cd98f0-72",
    "attachments": [
        {
            "fallback": "[<https://slack.com|slack>] slack incoming!",
            "pretext": "[<https://slack.com|slack>] slack incoming!",
            "color": "#2db67c",
            "fields": [
                {
                    "title": "This is the title",
                    "value": "The content below is the value:\n cant be seprateed by \"\\n\"",
                    "short":  "false"
                }
            ]
        }
    ]
}

slack_incoming(
    slack_incoming_url,
    payload=payload
)

Project details


Release history Release notifications

This version

0.1.1

Download files

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

Files for islack, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size islack-0.1.1-py2-none-any.whl (4.5 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size islack-0.1.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page