skip to navigation
skip to content

bottle-websocket 0.2.7

WebSockets for bottle

Latest Version: 0.2.9

This project adds websocket capabilities to [bottle](, leveraging [gevent-websocket]( and [gevent](

### Install
Use `pip` or `easy_install`:

pip install bottle-websocket

### Usage
Usage is pretty straight-forward, just import the server and plugin:

from bottle.ext.websocket import GeventWebSocketServer
from bottle.ext.websocket import websocket

You can use the websocket plugin to turn routes websocket handlers, the websocket is passed to the route as the first argument:

@get('/websocket', apply=[websocket])
def echo(ws):
while True:
msg = ws.receive()
if msg is not None:
else: break

And then use the provided server:

run(host='', port=8080, server=GeventWebSocketServer)

### Contributors
- [zeekay](
- [xeross](  
File Type Py Version Uploaded on Size
bottle-websocket-0.2.7.tar.gz (md5) Source 2014-04-14 1KB
  • Downloads (All Versions):
  • 19 downloads in the last day
  • 205 downloads in the last week
  • 1048 downloads in the last month