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.

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-1.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

rohrpost-1.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file rohrpost-1.1.1.tar.gz.

File metadata

  • Download URL: rohrpost-1.1.1.tar.gz
  • Upload date:
  • Size: 5.7 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-1.1.1.tar.gz
Algorithm Hash digest
SHA256 093ed1fcf399b134a133e78b1dd72175ac4b11e5c603f7b0842074a50d6df444
MD5 7ec3b2129874bc79c889fe6745722acb
BLAKE2b-256 e2085c654f17b1a294a6b935d2404df3e6f734d1193696455b2d2d0511cb909b

See more details on using hashes here.

File details

Details for the file rohrpost-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: rohrpost-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17b8d8aeec71c8462a2c659e33774a41e296619a0397124f6f7a23f6fdb2be1f
MD5 d8497c6d517e20063e7f7a9f67626904
BLAKE2b-256 df6ad3fe501b290931056613e9a3deee3de2a6beb7fac14ec22d60340ebd99a8

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