Skip to content

avsd/ably-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ably-python

Ably.io python client library - REST interface

Dependencies

The ably-python client has one dependency, requests>=1.0.0

Features

  • Connection Pooling
  • HTTP Keep-Alive
  • Python 2.6-3.3
  • Compatible with gevent

Installation

From PyPi

pip install ably-python

From a git url

pip install -e git+https://github.com/ably/ably-python#egg=AblyPython

Locally

git clone https://github.com/ably/ably-python.git
cd ably-python
python setup.py install

To run the tests

python setup.py test

Basic Usage

from ably.rest import AblyRest

ably = AblyRest("key_str")
ably.time() # returns the server time in ms since the unix epoch
ably.stats() # returns an array of stats

# Channels:
# Publish a message to channel 'foo'
ably.channels.foo.publish('msg_name', 'msg_data')

# Get the history for channel 'foo'
ably.channels.foo.history()

# Get presence for channel 'foo'
ably.channels.foo.presence()

Options

Credentials

You can provide either a key string or app_id + key_id + key_value combination.

ably = AblyRest("key-string")

or

ably = AblyRest(app_id="app-id", key_id="key-id", key_value="key-value")

About

Python REST client for Ably real-time messaging service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%