Metadata-Version: 2.1
Name: islack
Version: 0.1.1
Summary: Slack tools.
Home-page: https://github.com/icmdb/iwebhooks/
Author: teachmyself
Author-email: teachmyself@126.com
License: MIT
Keywords: islack,Slack,incoming
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Description-Content-Type: text/markdown
Requires-Dist: requests

# 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
)
```


