Registry / web-framework / bottle-websocket

bottle-websocket

JSON →
library0.2.9pypypi✓ verified 80d ago

WebSocket support for the Bottle micro web-framework. Version 0.2.9 is the latest release; the library wraps gevent and GeventWebSocketHandler to provide real-time bidirectional communication. Development appears stalled since 2013.

pip install bottle-websocket
INSTALL
IMPORT
SIG · BOTTLE-WEBSOCKET
B
bottle-websocket
web-frameworkpythonv0.2.9
Install
3.8s avg
Import
Disk
33MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 3.7s
py 3.11
✓ —
✓ 3.2s
py 3.12
✓ —
✓ 4.3s
py 3.13
✓ —
✓ 4s
py 3.9
✕ build_error
✕ build_error
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GeventWebSocketServer
from bottle_websocket import GeventWebSocketServer
from bottle.ext.websocket import WebSocket
websocket
from bottle_websocket import websocket
plugin
from bottle_websocket import plugin

Basic echo server using Bottle-WebSocket with GeventWebSocketServer.

from bottle import Bottle, request from bottle.ext.websocket import GeventWebSocketServer from bottle.ext.websocket import websocket app = Bottle() @app.route('/echo') def handle_websocket(ws): while True: msg = ws.receive() if msg is None: break ws.send('echo: ' + msg) if __name__ == '__main__': from bottle import run run(app, server=GeventWebSocketServer, host='localhost', port=8080)
Debug
Known issues
gotchaThe package has not been updated since 2013 and relies on outdated dependencies (gevent < 1.1, gevent-websocket). Modern versions of gevent may break compatibility.
fix
Pin gevent to 1.0.2 and gevent-websocket to 0.9.5, or consider an alternative like Flask-SocketIO or aiohttp for new projects.
affects: >=0.2.9
gotchaThe server must be GeventWebSocketServer; using Bottle's default server will not handle WebSocket upgrades.
fix
Pass `server=GeventWebSocketServer` to `run()` or use `app.run(server=GeventWebSocketServer)`.
affects: all
deprecatedPython 2 is no longer supported by the Python ecosystem; this library has not been updated for Python 3 compatibility in many areas.
fix
Test thoroughly with Python 3; consider migrating to a maintained alternative.
affects: all
Upgrade
Version history
0.2.9latest on PyPI · released Sep 21, 2015
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources