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==3.*

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 .
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-3.0.0a3.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

rohrpost-3.0.0a3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file rohrpost-3.0.0a3.tar.gz.

File metadata

  • Download URL: rohrpost-3.0.0a3.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13

File hashes

Hashes for rohrpost-3.0.0a3.tar.gz
Algorithm Hash digest
SHA256 fa07da1cf75fab497307fef1c3dc4b56eeda6a191b1e7844b2f86bd429373f2a
MD5 6658ba8829dc1172f53a193f790c7fac
BLAKE2b-256 dc3b7c5a97896d139926b85e92986a60100b9e53deb6c05eedb79184a3468816

See more details on using hashes here.

File details

Details for the file rohrpost-3.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: rohrpost-3.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13

File hashes

Hashes for rohrpost-3.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 92c0edf7f51a4903c50a8d6170c0afc3584e042c95e536d053a930dbd620944f
MD5 73498ea05ae9ce7ff7dcbc8583b6f6e0
BLAKE2b-256 1eed33d737e0a70038401b2497e7ddba53ddb67faef5dcefaf568da2616356df

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