Metadata-Version: 2.0
Name: slackly
Version: 1.0.6
Summary: A full featured python Slack API SDK
Home-page: https://slackly.io
Author: Hunter Senft-Grupp
Author-email: huntcsg@gmail.com
License: UNKNOWN
Keywords: slack slackly api sdk realtime
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
Requires-Dist: backports.functools-lru-cache
Requires-Dist: requests
Requires-Dist: six
Requires-Dist: websocket-client
Provides-Extra: docs
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
Provides-Extra: testing
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: pytest-cov; extra == 'testing'

Slackly - A Slack Toolkit
-------------------------

|gitter| |travis| |pypi| |docs|

Use Cases:

    - Use the `slackly.SlackClient` to make calls to the Web API
    - Use the `slackly.SlackRTMClient` to listen to the Real Time Messaging API (via a websocket connection)
    - Use the `slackly.events` and `slackly.schema.types` in this library to build higher level abstractions on the Slack API


    .. DANGER::

       This library is very much in alpha and under very active development to flesh out the API. I'll do my best
       to not make breaking changes, and hide most of these changes behind feature toggles that can become default
       in future versions. I want users and feedback, so I will do my utmost to make usage of this library as safe
       as can be.

Installing
==========

   .. code-block:: shell

      $ pip install slackly

Simple Examples
===============

Creating a Client and Making an API Call
****************************************

    .. code-block:: python

        from slackly import SlackClient
        import os

        client = SlackClient(token=os.environ['SLACK_TOKEN'])

        # Call the api.test endpoint
        client.api_call('api.test')

Creating the API object and preparing a call
********************************************

    .. code-block:: python

        from slackly import SlackAPI, SlackClient
        import os
        slack = SlackAPI()

        # Prepare an api call. Pass "api_call" a client to get actually make the call
        api_call = slack.api.test()

        client = SlackClient(token=os.environ['SLACK_TOKEN'])
        result = api_call(client)

Printing Events off of the Real Time Messaging API
**************************************************

    .. code-block:: python

        import os
        from slackly import SlackRTMClient

        rtm_client = SlackRTMClient.from_token(token=os.environ['SLACK_TOKEN'])
        for event in rtm_client.get_events_forever():
            print(event)

Using Event Types
*****************

    .. code-block:: python

        import os
        from slackly import SlackRTMClient, SlackEventParsed
        from slackly.events import Message, UserTyping
        rtm_client = SlackRTMClient.from_token(token=os.environ['SLACK_TOKEN'])
        rtm_client.event_factory = SlackEventParsed  # Tell the RTM client to make events using this class

        for event in rtm_client.get_events_forever():
            if isinstance(event, Message):
                print("We're dealing with a message")

            elif isinstance(event, UserTyping):
                print("Someone's typing")

            else:
                print("I don't care about this event")


Development
===========

   .. code-block:: shell

      $ git clone https://github.com/huntcsg/slackly.git
      $ cd slackly
      $ tox    # Runs test suites against all python versions, pypy, does style and test coverage analysis

1. All pull requests must pass the travis-ci builds
2. All pull requests should include inline (docstring) documentation, updates to built documentation if applicable,
   and test coverage. This project aspires to be a 100% test coverage library.
3. If integration or regression test coverage is needed, let the project maintainer know and we can work out
   the best way to do so.


.. |gitter| image:: https://badges.gitter.im/huntcsg/slackly.png
   :target: https://gitter.im/slackly/Lobby
.. |travis| image:: https://travis-ci.org/huntcsg/slackly.svg?branch=master
   :target: https://travis-ci.org/huntcsg/slackly
.. |pypi| image:: https://img.shields.io/pypi/v/slackly.svg
   :target: https://pypi.python.org/pypi/slackly
.. |docs| image:: https://readthedocs.org/projects/slackly/badge/?version=latest
   :target: http://slackly.readthedocs.io/en/latest/?badge=latest

Changes
=======

1.0.4
*****
- Documentation Updates and Release stability

1.0.0
*****

- Initial Release

Authors
-------

Hunter Senft-Grupp


