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==2.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.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

rohrpost-2.0.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rohrpost-2.0.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for rohrpost-2.0.1.tar.gz
Algorithm Hash digest
SHA256 6b7e5e88aba02d1efcb51149c21796720cf979118f116eb74fc08db72eef61cf
MD5 07a27e67647881e6092941b0e7609cd3
BLAKE2b-256 555575ebf3e93d37fb86fe25f488eca793f3d7e6b136139419080201af2915d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rohrpost-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for rohrpost-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53b75f1ffeb43a603a718f7c4a2d41535e105ce700e5923f25bd91a35550b1ad
MD5 ea9b1599de34259766a66223c360a65f
BLAKE2b-256 02b15258d72df7effc0b78f525f64f13e24bf79e8228b6a520ca414dd541e51b

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