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 https://github.com/user/repository/archive/branch.zip

Or add this line to your requirements.txt:

https://github.com/user/repository/archive/branch.zip

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
isort -rc .
pylava

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

Uploaded Source

Built Distribution

rohrpost-1.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rohrpost-1.0.1.tar.gz
  • Upload date:
  • Size: 5.3 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.0.1.tar.gz
Algorithm Hash digest
SHA256 6089231c6c964a6d63825f2218c7e680b6b66470905ea2250cd9d1fbccb1030f
MD5 edb762e32573cadb5d9322f6efa7a9af
BLAKE2b-256 8a62c9db43fc2c03c68493b69b7b76f07d5a7d4afe082ac726e720333b1cde84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rohrpost-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26bc8d768d5101cdf1864fe876ab79daa1aaa86c646103a3305d37d95c6b5254
MD5 e902c45558a2e8cad94d611d4a97cc77
BLAKE2b-256 f891398934d03bd73776aa883bd669a68bb7ca74670f13ecc122ceb56f1c56b4

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