Skip to main content

SockJs for Flask

Project description

SockJS server for Flask

.. image::
:alt: Latest PyPI version

.. image::
:alt: Latest Travis CI build status

`sockjs` is a `SockJS <>`_ integration for Flask. SockJS interface
is implemented as a flask route. Its possible to create any number of different sockjs routes, ie `/sockjs/*` or `/mycustom-sockjs/*`.
You can provide different session implementation and management for each sockjs route.


Client side code::

<script src="//"></script>
var sock = new SockJS('http://localhost:5000/sockjs');

sock.onopen = function() {

sock.onmessage = function(obj) {

sock.onclose = function() {

1. Install virtualenv::

$ wget
$ python3.6 ./ --no-site-packages sockjs

3. Install sockjs-flask from pypi and then install::

$ pip install sockjs-flask
$ cd sockjs
$ ../sockjs/bin/python

To run chat example use following command::

$ ./sockjs/bin/python ./sockjs-flask/examples/


- Python >= 3.4
- gunicorn
- gevent
- gevent-websocket
- kombu (for subscription)


`sockjs-flask` was written by `Kryuchkov Nikita <>`_.

Project details

Download files

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

Files for sockjs-flask, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size sockjs-flask-0.3.tar.gz (17.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page