Metadata-Version: 2.4
Name: dasf-broker-django
Version: 1.0.0
Summary: A Django-based message broker implementing the messaging protocol of the Data Analytics Software Framework (DASF), inspired by Apache Pulsar.
Author-email: "Philipp S. Sommer" <philipp.sommer@hereon.de>
Maintainer-email: "Philipp S. Sommer" <philipp.sommer@hereon.de>
License-Expression: EUPL-1.2
Project-URL: Homepage, https://codebase.helmholtz.cloud/dasf/dasf-broker-django
Project-URL: Documentation, https://dasf.readthedocs.io/projects/message-broker/en/latest/
Project-URL: Source, https://codebase.helmholtz.cloud/dasf/dasf-broker-django
Project-URL: Tracker, https://codebase.helmholtz.cloud/dasf/dasf-broker-django/issues/
Keywords: digital earth,helmholtz,gfz,potsdam,dasf,data analytics,django,messaging,message broker,websocket,channels,rpc
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSES/Apache-2.0.txt
License-File: LICENSES/CC-BY-4.0.txt
License-File: LICENSES/CC0-1.0.txt
License-File: LICENSES/EUPL-1.2.txt
Requires-Dist: Django<5.3,>=3.2
Requires-Dist: channels
Requires-Dist: django-guardian
Provides-Extra: pytest
Requires-Dist: pytest-django; extra == "pytest"
Requires-Dist: daphne; extra == "pytest"
Provides-Extra: drf
Requires-Dist: djangorestframework; extra == "drf"
Provides-Extra: jobs
Requires-Dist: django-extensions; extra == "jobs"
Provides-Extra: testsite
Requires-Dist: dasf-broker-django[drf,jobs,pytest]; extra == "testsite"
Requires-Dist: tox; extra == "testsite"
Requires-Dist: isort==7.0.0; extra == "testsite"
Requires-Dist: black==25.9.0; extra == "testsite"
Requires-Dist: blackdoc==0.4.6; extra == "testsite"
Requires-Dist: flake8==7.3.0; extra == "testsite"
Requires-Dist: pre-commit; extra == "testsite"
Requires-Dist: mypy==1.18.2; extra == "testsite"
Requires-Dist: pytest-cov; extra == "testsite"
Requires-Dist: reuse==6.2.0; extra == "testsite"
Requires-Dist: cffconvert; extra == "testsite"
Requires-Dist: django-environ; extra == "testsite"
Requires-Dist: django-stubs; extra == "testsite"
Requires-Dist: pytest-django; extra == "testsite"
Requires-Dist: dasf; extra == "testsite"
Provides-Extra: docs
Requires-Dist: dasf-broker-django[drf,jobs,pytest]; extra == "docs"
Requires-Dist: autodocsumm; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: hereon-netcdf-sphinxext; extra == "docs"
Requires-Dist: sphinx-design; extra == "docs"
Requires-Dist: django-environ; extra == "docs"
Requires-Dist: myst_parser; extra == "docs"
Requires-Dist: daphne; extra == "docs"
Requires-Dist: djangorestframework; extra == "docs"
Provides-Extra: dev
Requires-Dist: dasf-broker-django[testsite]; extra == "dev"
Requires-Dist: dasf-broker-django[docs]; extra == "dev"
Requires-Dist: reuse-shortcuts>=1.0.1; extra == "dev"
Requires-Dist: PyYAML; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Dynamic: license-file

<!--
SPDX-FileCopyrightText: 2022-2025 Helmholtz-Zentrum hereon GmbH

SPDX-License-Identifier: CC-BY-4.0
-->

# Django-based Message Broker for DASF

[![CI](https://codebase.helmholtz.cloud/dasf/dasf-broker-django/badges/main/pipeline.svg)](https://codebase.helmholtz.cloud/dasf/dasf-broker-django/-/pipelines?page=1&scope=all&ref=main)
[![Code coverage](https://codebase.helmholtz.cloud/dasf/dasf-broker-django/badges/main/coverage.svg)](https://codebase.helmholtz.cloud/dasf/dasf-broker-django/-/graphs/main/charts)
[![Docs](https://readthedocs.org/projects/dasf-broker-django/badge/?version=latest)](https://dasf.readthedocs.io/projects/message-broker/en/latest/)
[![Latest Release](https://codebase.helmholtz.cloud/dasf/dasf-broker-django/-/badges/release.svg)](https://codebase.helmholtz.cloud/dasf/dasf-broker-django)
<!-- TODO: uncomment the following line when the package is published at https://pypi.org -->
<!-- [![PyPI version](https://img.shields.io/pypi/v/dasf-broker-django.svg)](https://pypi.python.org/pypi/dasf-broker-django/) -->
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
<!-- TODO: uncomment the following line when the package is registered at https://api.reuse.software -->
<!-- [![REUSE status](https://api.reuse.software/badge/codebase.helmholtz.cloud/dasf/dasf-broker-django)](https://api.reuse.software/info/codebase.helmholtz.cloud/dasf/dasf-broker-django) -->


A Django-based message broker implementing the messaging protocol of the
[Data Analytics Software Framework (DASF)][dasf], inspired by Apache Pulsar.

The broker connects clients (such as a web frontend or a python script) with
backend modules that run the requested functions. All of them talk to the broker
via websockets, so that backend modules can run anywhere and come and go at any
time. It features

- topics with fine-grained permissions, managed in the Django admin and with the
  `dasf_topic` command,
- subscriptions in the style of Apache Pulsar (`exclusive`, `failover`, `shared`,
  `spread`) with acknowledgements, redelivery of missed messages and a
  configurable storage of messages,
- short-lived tokens that allow backend modules to act on behalf of the user who
  sent a request,
- request quotas per user and topic,
- pings and a status endpoint to monitor backend modules,
- an optional web frontend that renders a page with forms, progress reports and
  results for every topic, and
- a docker-based deployment template.

## Deployment

The recommended way to run the broker is the
[dasf-broker-docker-template][docker-template]. It generates a docker compose
setup with daphne, postgres, redis and nginx. See the [deployment
docs][deployment] for how to use it.

[dasf]: https://dasf.readthedocs.io/en/latest/
[docker-template]: https://codebase.helmholtz.cloud/dasf/templates/dasf-broker-docker-template
[deployment]: https://dasf.readthedocs.io/projects/message-broker/en/latest/deployment.html

## Installation

To add the broker to your own Django project, install this package in a
dedicated python environment via

```bash
python -m venv venv
source venv/bin/activate
pip install "dasf-broker-django[drf,jobs]"
```

and follow the [installation instructions][docs] in the docs. To use this in a
development setup, clone the [source code][source code] from gitlab, start the
development server and make your changes:

```bash
git clone https://codebase.helmholtz.cloud/dasf/dasf-broker-django
cd dasf-broker-django
python -m venv venv
source venv/bin/activate
make dev-install
make build-static  # download the files of the frontend
```

You find the full documentation, including a [getting started
guide][getting-started], at https://dasf.readthedocs.io/projects/message-broker/en/latest/.


[source code]: https://codebase.helmholtz.cloud/dasf/dasf-broker-django
[docs]: https://dasf.readthedocs.io/projects/message-broker/en/latest/installation.html
[getting-started]: https://dasf.readthedocs.io/projects/message-broker/en/latest/getting-started.html

## Technical note

This package has been generated from the template
https://codebase.helmholtz.cloud/hcdc/software-templates/django-app-template.git.

See the template repository for instructions on how to update the skeleton for
this package.


## License information

Copyright © 2022-2025 Helmholtz-Zentrum hereon GmbH



Code files in this repository are licensed under the
EUPL-1.2, if not stated otherwise
in the file.

Documentation files in this repository are licensed under CC-BY-4.0, if not stated otherwise in the file.

Supplementary and configuration files in this repository are licensed
under CC0-1.0, if not stated otherwise
in the file.

Please check the header of the individual files for more detailed
information.



### License management

License management is handled with [``reuse``](https://reuse.readthedocs.io/).
If you have any questions on this, please have a look into the
[contributing guide][contributing] or contact the maintainers of
`dasf-broker-django`.

[contributing]: https://dasf.readthedocs.io/projects/message-broker/en/latest/contributing.html
