Code Monkey home page Code Monkey logo

python-slackrealtime's Introduction

python-slackrealtime

Python library for the Slack Real-Time Messaging API. Requires Twisted and Autobahn.

Currently a work in progress, not all of the protocol is implemented, and the behaviour of this library is not fully documented.

The project aims to provide a light wrapping around Slack's API in order to make objects of some of it's constructs, and provide some convenience functionality (such as converting timestamps to fully-fledged datetime objects). As such, the API will adapt (to a degree) to Slack RTM API changes.

It also includes a very thin wrapper around Slack's REST API (slackrealtime.api), for the purposes of setting up the initial connection.

It is designed primarily to allow writing bots that interact with the Slack API. I have a repository with examples available.

LGPLv3+ license.

There also exists a Python library written by Slack themselves which doesn't use Twisted, python-slackclient.

Installing the dev version

You'll need to install non-Python dependencies:

# apt-get install libffi-dev python-dev build-essential

In order to install the development version from the git repository:

$ pip install 'git+https://github.com/micolous/python-slackrealtime.git#egg=slackrealtime'

This can also be included in a requirements.txt file like this:

git+https://github.com/micolous/python-slackrealtime.git#egg=slackrealtime

Getting an API token

There are three ways to get an API token for this library:

  • xoxb: Add a Bots integration to your team, which has some additional restrictions.
  • xoxp: Use the Slack Web API page to create a token for your user.
  • xoxs: Scrape the Slack Web UI for a variable called boot_data.api_token, which additionally allows you access to the users.admin family of undocumented methods.

This library does not presently support OAuth or other such authentication mechanisms, only static API tokens.

python-slackrealtime's People

Contributors

micolous avatar msabramo avatar

Watchers

James Cloos avatar Jim Huang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.