Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Real time communication for pyramid using WebSockets

Project Description


Stargate is a package for adding WebSockets_ support to
pyramid applications using the excellent eventlet library for long running

What is a WebSocket?

From wikipedia::

WebSockets is a technology providing for bi-directional, full-duplex
communications channels, over a single TCP socket

The WebSocket protocol provides a persistent low latency, low complexity way to
achieve two way communication from the browser to server.

From a client point of view using websocket is very simple::

var ws = new WebSocket('ws://somehost/some/url');
ws.onopen = function(msg){
//do some cool setup
ws.onmessage = function(msg){
//do something cool
ws.onclose = function(msg){
//do some clean up... stay cool

// later:
ws.send('How cool am I?!');

That's pretty much all there is to it.

Normally the websocket communication in a web app is implemented as a stand alone
server (perhaps running on a different port). rpz.websocket allows you to connect
persistent connection directly to the same objects that serve your HTML.


.. note:: Still under construction

Documentation is maintained at


.. [WebSockets]
.. [spec]



- Add support for the HyBi version of WebSockets (specifically version-10). This version was released to solve some previous security concerns and
will be the version in Firefox 7/8 and Chrome 14 onwards accoring to Wikipedia.
- Introduces a dependency on ws4py

- See


- Fix bug in
- Improve documentation and consistency with pyramid naming


- Support for version 76 of the websocket handshake


- Initial release, ported from rpz.websocket and repoze.bfg to pyramid

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(418.9 kB) Copy SHA256 Hash SHA256
Source Sep 5, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting