Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gfreezy/slacker-asyncio

Full-featured Python interface for the Slack API
https://github.com/gfreezy/slacker-asyncio

Last synced: 6 days ago
JSON representation

Full-featured Python interface for the Slack API

Awesome Lists containing this project

README

        

==================
Slacker-asyncio
==================
|version|_
|pypi|_
|build status|_
|pypi downloads|_

About
=====

Slacker-asyncio is a full-featured Python interface for the `Slack API
`_. Slacker is a fork of `slacker `_
to asyncio.

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

import asyncio
from slacker import Slacker

async def run():
with aiohttp.ClientSession() as session:
slack = Slacker('', session=session)

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

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

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

loop = asyncio.get_event_loop()
loop.run_until_complete(run())

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

.. code-block:: bash

$ pip install slacker-asyncio

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

https://api.slack.com/methods

.. |version| image:: https://img.shields.io/pypi/pyversions/Slacker-asyncio.svg
.. _version: https://pypi.python.org/pypi/slacker-asyncio/
.. |build status| image:: https://img.shields.io/travis/gfreezy/slacker-asyncio.svg
.. _build status: http://travis-ci.org/gfreezy/slacker-asyncio
.. |pypi| image:: https://img.shields.io/pypi/v/Slacker-asyncio.svg
.. _pypi: https://pypi.python.org/pypi/slacker-asyncio/
.. |pypi downloads| image:: https://img.shields.io/pypi/dm/Slacker-asyncio.svg
.. _pypi downloads: https://pypi.python.org/pypi/slacker-asyncio/