Skip to content

gfreezy/slacker-asyncio

 
 

Repository files navigation

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

import asyncio
from slacker import Slacker


async def run():
    with aiohttp.ClientSession() as session:
        slack = Slacker('<your-slack-api-token-goes-here>', 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

$ pip install slacker-asyncio

Documentation

https://api.slack.com/methods

About

Full-featured Python interface for the Slack API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%