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:
python -m pytest python -m isort . python -m black rohrpost tests python -m flake8 python -m pylint --recursive=y --reports=y --verbose ./
Metadata
Release files for rohrpost 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rohrpost-4.1.0.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rohrpost-4.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.4 kB
Release files / rohrpost-4.1.0.tar.gz
| Download URL | rohrpost-4.1.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bf9b5cd6ea3d64f104e2ae763299c28b3ba401b463256bcf38fc3cfa3052c51
|
|
BLAKE2b-256 checksum How to use checksums |
bb6c291b44b10f065711e06e1f1ea03996ebca24c93b91a440637c7a76579a1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|
Release files / rohrpost-4.1.0-py3-none-any.whl
| Download URL | rohrpost-4.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
498e55600be1938aa8014a0103c880c01e8e427e88d03b97085805a800385404
|
|
BLAKE2b-256 checksum How to use checksums |
1a8ae8c7bfdd60aa1a14b4c3050293828d12180732a4b92667a559f4fa419a13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|