Django pubsub
Django Pubsub wrapper.
Installation with requirements.txt
djangopubsub
With PIP
$ pip install djangopubsub
Add app to django settings
INSTALLED_APPS = (
...,
'djangopubsub'
)
Available settings and defaults:
BASE_DIR = '' # Root directory for handlers lookup
EVENT_HANDLERS_DIR_NAME = 'event_handlers' # Directory with handlers on every app module
HANDLER_FILES_PREFIX = 'handlers_' # handlers file prefix
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
PUB_SUB_EMIT = True # Avoid to emit message when emit is called (for tests)
Decorator
@on_event('EVENT_NAME')
def func_to_execute(data):
pass
Pubsub emit
from djangopubsub.djangoPubSub import DjangoPubSub
DjangoPubSub().emit('EVENT_NAME', {})
Pubsub receiver
Needs redis running on port:REDIS_PORT
python manage.py runpubsubreceiver --settings=your_proyect.settings
Metadata
Release files for djangopubsub 0.3.5
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 | |
|---|---|---|---|---|
| djangopubsub-0.3.5.tar.gz | 3.7 kB | Without provenance | Details |
Release files / djangopubsub-0.3.5.tar.gz
| Download URL | djangopubsub-0.3.5.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdd36251fa1d420abcf920d5ce63bed0cae3b8d29a6acf92370e1da3e004ebca
|
|
BLAKE2b-256 checksum How to use checksums |
8171c61bf2053ead2cdf2920dab47bf078d21e625a79293b74567293b100771c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|
Security for djangopubsub 0.3.5
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.