Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

python client for UCEngine

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

UCEngine API for Python

A python client for UCEngine. Async is handled with gevent.

Status

Minimalistic implementation.

Install

python setup.py build
sudo python setup.py install

Test

Lauch the server (Erlang side)

demo:start().

And the test (Python side)

python test/basic.py

API

# an engine
uce = UCEngine('localhost', 5280)
# a user
victor = User('victor.goya@af83.com')
# connecting
victor.presence(uce, 'pwd')
# asking hour to the server
print victor.time()
# registering callback. Meeting creation is lazy
victor.meetings['demo'].callback('chat.message.new', lambda event: print event)
# joining
victor.meetings['demo'].join()
# fire and forget a message
victor.meetings['demo'].async_chat('bonjour Monde', 'fr')

The callback should print the event

Code

Validated with pyflakes and pylint

Something went wrong with that request. Please try again.