Skip to main content
This project adds websocket capabilities to [bottle](http://bottlepy.org), leveraging [gevent-websocket](http://www.gelens.org/code/gevent-websocket/) and [gevent](http://www.gevent.org/).

### 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:
ws.send(msg)
else: break

And then use the provided server:

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

### Contributors
- [zeekay](https://github.com/zeekay)
- [xeross](https://github.com/xeross)

Metadata

Release files for bottle-websocket 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bottle-websocket 0.2.9
File Size Uploaded Provenance
bottle-websocket-0.2.9.tar.gz 2.0 kB Without provenance Details

Release files / bottle-websocket-0.2.9.tar.gz

Download URL bottle-websocket-0.2.9.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9887f70dc0c7592ed8d0d11a14aa95dede6cd08d50d83d5b81fd963e5fec738b
BLAKE2b-256 checksum
How to use checksums
178ea22666b4bb0a6e31de579504077df2b1c2f1438136777c728e6cfabef295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bottle-websocket 0.2.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page