Python client for Janus.
Project description
Python client for janus.
dev
Setup a venv:
$ mkvirtualenv janus
(janus)$ pip install -e .[test]
and test it:
(janus)$ py.test test/ --cov janus --cov-report term-missing --pep8
usage
Typical usage is to create a representation of your Janus Plugin:
class MyPlugin(janus.Plugin):
name = 'janus.plugin.krazyeyezkilla'
def sup(self, greets)
self.send_message({'wat': greets})
my_plugin = MyPlugin()
setup a Session:
session = janus.Session('ws://127.0.0.1', secret='janusrocks')
session.register_plugin(my_plugin)
keep it alive:
session_ka = janus.KeepAlive(session)
session_ka.daemon = True
session_ka.start()
and then use your plugin:
my_plugin.sup('dawg')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
janus-gateway-0.1.0.tar.gz
(8.7 kB
view hashes)