Django Message Broker
Django Message Broker is a plugin written in Python for Django that provides an all-in-one message broker. It interfaces with Django Channels and Celery [1], and replaces the need for separate message brokers such as Redis and RabbitMQ.
The motivating use case for Django Message Broker is small site solutions where it is easier to deploy a single server containing all the required functionality rather than a multi-server solution. An example would be a small site running data science models, where executing the model is a long running process and needs to execute in the background so that it doesn’t degrade the responsiveness of the user interface.
Potential scenarios for Django Message Broker include:
- Prototyping, Testing, Training
- Data science projects where the model complexity exceeds the capabilities of packages such as Shiny, Dash and Streamlit.
- Small systems with a low number of users.
The Django Message Broker is an installable component of the Django platform that provides an easy to install, all-in-one alternative for small scale solutions. It does not replace the need for high volume message brokers where message volume and redundancy are important.
Note
- The Celery interface is in development and not supported in this release.
Installation
Install latest stable version into your python environment using pip::
pip install django-message-broker
Once installed add django_message_broker to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = (
'django_message_broker',
...
)
Django Message Broker should be installed as early as possible in the installed applications list and ideally before other applications such as Channels and Celery. The message broker forks a background process which should occur before other applications create new threads in the current process.
Configure Django Channels Layers
To configure the Django Message Broker as a Channels layer add the following to the CHANNEL_LAYERS
setting in settings.py:
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'django_message_broker.ChannelsServerLayer',
},
}
Metadata
Release files for django-message-broker 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-message-broker-0.2.1.tar.gz | 29.9 kB | Without provenance | Details for django-message-broker-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_message_broker-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for django_message_broker-0.2.1-py3-none-any.whl |
Total release size: 68.8 kB
Release files / django-message-broker-0.2.1.tar.gz
| Download URL | django-message-broker-0.2.1.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e35340b312a57ac1eed2959a1992a6d32cde1a6eedce6688e4a0de980f254e6e
|
|
BLAKE2b-256 checksum How to use checksums |
fb4188b449a794022256a27d57d8f3e805f664046a10bc10b7b7b5bf9a94243b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.12 Linux/5.10.60.1-microsoft-standard-WSL2
|
Release files / django_message_broker-0.2.1-py3-none-any.whl
| Download URL | django_message_broker-0.2.1-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f58998c8255f4640d83ceb843b29aabc29e9ffd49ffa1c548161d9c6b20c60e7
|
|
BLAKE2b-256 checksum How to use checksums |
d9da65708804e1abcd0af620b52215046725bb00c2398f3c6b1998625a2c8d4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.8.12 Linux/5.10.60.1-microsoft-standard-WSL2
|
Security for django-message-broker 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.