slacker


Nameslacker JSON
Version 0.14.0 PyPI version JSON
download
home_pagehttp://github.com/os/slacker/
SummarySlack API client
upload_time2020-02-15 09:06:13
maintainer
docs_urlNone
authorOktay Sancak
requires_python
licensehttp://www.apache.org/licenses/LICENSE-2.0
keywords slack api
VCS
bugtrack_url
requirements requests
Travis-CI
coveralls test coverage No coveralls.
            =======
Slacker
=======

|pypi|_
|build status|_
|pypi downloads|_
|license|_
|gitter chat|_

.. image:: https://raw.githubusercontent.com/os/slacker/master/static/slacker.jpg

About
=====

Slacker is a full-featured Python interface for the `Slack API
<https://api.slack.com/>`_.

Installation
============

.. code-block:: bash

    $ pip install slacker

Examples
========
.. code-block:: python

    from slacker import Slacker

    slack = Slacker('<your-slack-api-token-goes-here>')

    # Send a message to #general channel
    slack.chat.post_message('#general', 'Hello fellow slackers!')

    # Get users list
    response = slack.users.list()
    users = response.body['members']

    # Upload a file
    slack.files.upload('hello.txt')

    # If you need to proxy the requests
    proxy_endpoint = 'http://myproxy:3128'
    slack = Slacker('<your-slack-api-token-goes-here>',
                    http_proxy=proxy_endpoint,
                    https_proxy=proxy_endpoint)

    # Advanced: Use `request.Session` for connection pooling (reuse)
    from requests.sessions import Session
    with Session() as session:
        slack = Slacker(token, session=session)
        slack.chat.post_message('#general', 'All these requests')
        slack.chat.post_message('#general', 'go through')
        slack.chat.post_message('#general', 'a single https connection')


Documentation
=============

https://api.slack.com/methods


.. |build status| image:: https://img.shields.io/travis/os/slacker.svg
.. _build status: http://travis-ci.org/os/slacker
.. |pypi downloads| image:: https://img.shields.io/pypi/dm/slacker.svg
.. _pypi downloads: https://pypi.org/project/slacker/
.. |pypi| image:: https://img.shields.io/pypi/v/Slacker.svg
.. _pypi: https://pypi.python.org/pypi/slacker/
.. |license| image:: https://img.shields.io/github/license/os/slacker.svg
.. _license: https://pypi.org/project/slacker/
.. |gitter chat| image:: https://badges.gitter.im/Join%20Chat.svg
.. _gitter chat: https://gitter.im/os/slacker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/os/slacker/",
    "name": "slacker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "slack api",
    "author": "Oktay Sancak",
    "author_email": "oktaysancak@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/e5/ea90f49e6d0905dcb2d0ab47e068b8f28f87dd97bd2e599164c693a52691/slacker-0.14.0.tar.gz",
    "platform": "",
    "description": "=======\nSlacker\n=======\n\n|pypi|_\n|build status|_\n|pypi downloads|_\n|license|_\n|gitter chat|_\n\n.. image:: https://raw.githubusercontent.com/os/slacker/master/static/slacker.jpg\n\nAbout\n=====\n\nSlacker is a full-featured Python interface for the `Slack API\n<https://api.slack.com/>`_.\n\nInstallation\n============\n\n.. code-block:: bash\n\n    $ pip install slacker\n\nExamples\n========\n.. code-block:: python\n\n    from slacker import Slacker\n\n    slack = Slacker('<your-slack-api-token-goes-here>')\n\n    # Send a message to #general channel\n    slack.chat.post_message('#general', 'Hello fellow slackers!')\n\n    # Get users list\n    response = slack.users.list()\n    users = response.body['members']\n\n    # Upload a file\n    slack.files.upload('hello.txt')\n\n    # If you need to proxy the requests\n    proxy_endpoint = 'http://myproxy:3128'\n    slack = Slacker('<your-slack-api-token-goes-here>',\n                    http_proxy=proxy_endpoint,\n                    https_proxy=proxy_endpoint)\n\n    # Advanced: Use `request.Session` for connection pooling (reuse)\n    from requests.sessions import Session\n    with Session() as session:\n        slack = Slacker(token, session=session)\n        slack.chat.post_message('#general', 'All these requests')\n        slack.chat.post_message('#general', 'go through')\n        slack.chat.post_message('#general', 'a single https connection')\n\n\nDocumentation\n=============\n\nhttps://api.slack.com/methods\n\n\n.. |build status| image:: https://img.shields.io/travis/os/slacker.svg\n.. _build status: http://travis-ci.org/os/slacker\n.. |pypi downloads| image:: https://img.shields.io/pypi/dm/slacker.svg\n.. _pypi downloads: https://pypi.org/project/slacker/\n.. |pypi| image:: https://img.shields.io/pypi/v/Slacker.svg\n.. _pypi: https://pypi.python.org/pypi/slacker/\n.. |license| image:: https://img.shields.io/github/license/os/slacker.svg\n.. _license: https://pypi.org/project/slacker/\n.. |gitter chat| image:: https://badges.gitter.im/Join%20Chat.svg\n.. _gitter chat: https://gitter.im/os/slacker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n",
    "bugtrack_url": null,
    "license": "http://www.apache.org/licenses/LICENSE-2.0",
    "summary": "Slack API client",
    "version": "0.14.0",
    "split_keywords": [
        "slack",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "88939748345dfeb60f9fd774d8679e84",
                "sha256": "1ae7c597025c114e202b5c880345f150f795665bfc638010cac614ede4ed5108"
            },
            "downloads": -1,
            "filename": "slacker-0.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "88939748345dfeb60f9fd774d8679e84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10116,
            "upload_time": "2020-02-15T09:06:13",
            "upload_time_iso_8601": "2020-02-15T09:06:13.629834Z",
            "url": "https://files.pythonhosted.org/packages/ce/e5/ea90f49e6d0905dcb2d0ab47e068b8f28f87dd97bd2e599164c693a52691/slacker-0.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-02-15 09:06:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "os",
    "github_project": "slacker",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.2.1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "slacker"
}
        
Elapsed time: 0.01389s