Skip to main content

rohrpost WebSocket protocol for ASGI

Project description

rohrpost is a simple WebSocket protocol that works well with Django using Channels. It will interface with every service implementing the ASGI specification (which, at the moment, is primarily Channels with Daphne).

The client implementation is rohrpost-js.

NOTE: The master branch of this repo represents our work towards rohrpost 2. You can find the code for the stable release in branch 1.x.

Capabilities

rohrpost specifies a very simple protocol with messages looking like this:

{
    "id": 123,
    "type": "ping",
    "data": "something",
}

This message will be handled by the ping handler (which rohrpost provides out of the box). You can add custom handlers using a method decorator. Please see our documentation for details on the protocol and handler implementation.

rohrpost also provides a mixin for Django models to push notifications on changes (create, update, delete).

Installation

From the command line:

pip install rohrpost

Or add this line to your requirements.txt:

rohrpost==1.x

Development

For development you’ll need to have the test environment installed. This is rather large since rohrpost works mainly in conjunction with Channels, Daphne, Django and so on.

pip install -r requirements/dev.txt

Run tests and style checks in this directory:

py.test
pylava
isort -rc .
black rohrpost tests

Project details


Download files

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

Source Distribution

rohrpost-2.0.0a1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

rohrpost-2.0.0a1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file rohrpost-2.0.0a1.tar.gz.

File metadata

  • Download URL: rohrpost-2.0.0a1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for rohrpost-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 ca1beed8bbd7bc91bc95e68bec8ffff76ec7e4ac5a632e27239ace588e5ed877
MD5 18c6c22a4a0822780367e92281555ce8
BLAKE2b-256 f193413fa3c7549e8fe5e4f3458ae92ee8f442b404f52ec159a8983ebef3afff

See more details on using hashes here.

File details

Details for the file rohrpost-2.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: rohrpost-2.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for rohrpost-2.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 a208c0f7c9e502caa2782d864e093c3a97abe52d0e021714aa41d369d7ea5a1f
MD5 3d863298380b30b344f8f4394172274d
BLAKE2b-256 12f15b4f006fc39991f4b4777704c938b242238a18b50e172c6b4e38f9df30c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page