cloudblue/django-cqrs
54.3
Adequate · 9 November 2026
4.6k
lines of production code
Python
primary language
10
measurements over time
What this system is
Features
Added demo project master service with CQRS-enabled Django models
The master\_service example now includes a Django application that defines User, Product, ProductType, and Purchase models. These models integrate with the dj\_cqrs library via MasterMixin to enable Command Query Responsibility Segregation, publishing events to RabbitMQ. The service provides basic CRUD views for managing these entities and includes initial database migrations along with a data migration that seeds sample users and products.
_examples/demo\_project/master\service · high confidence
Added demo replica service example
A new Django-based demo application (\replica\_service\) has been added to the examples directory to illustrate the usage of the \dj\_cqrs\ library. This example includes a complete project structure with models for Users, Products, and Purchases, demonstrating both standard field replication and custom CQRS serialization logic. It is configured to connect to a MySQL database for persistent storage and Redis for caching purchase data, while using RabbitMQ as the message transport for synchronization.
_examples/demo\_project/replica\service · high confidence
New CQRS demo project example
Added a new \examples/demo\_project\ that demonstrates a CQRS architecture using two Django services: a master service storing data in PostgreSQL and a replica service replicating data to MySQL and Redis. The example includes Docker Compose configuration to orchestrate the services, RabbitMQ for the CQRS transport, and web interfaces for both services to interact with Users, Products, and Purchases.
examples · high confidence
New CQRS management commands for bulk I/O, synchronization, and dead-letter handling
This change introduces a suite of new Django management commands in the dj\_cqrs/management package to support bulk data operations, replication synchronization, and message queue management. The new commands include cqrs\_bulk\_dump and cqrs\_bulk\_load for exporting and importing CQRS model data in batches, cqrs\_sync and cqrs\_diff\_sync for filtering and synchronizing model rows to replicas with progress tracking, and cqrs\_consume for starting worker processes with optional auto-reload. Additionally, commands for managing dead-letter queues (cqrs\_dead\_letters), detecting deleted objects (cqrs\_deleted\_diff\_master, cqrs\_deleted\_diff\_replica, cqrs\_deleted\_sync\_replica), and streaming diffs (cqrs\_diff\_master, cqrs\_diff\_replica) are added. These commands provide granular control over CQRS data flow, allowing users to specify batch sizes, filters, and output destinations, while also improving error handling and connection resilience during synchronization tasks.
_dj\cqrs/management · high confidence
Architecture
Migration to GitHub Actions and MkDocs documentation
The project has replaced its legacy Jenkins CI pipeline with GitHub Actions workflows, enabling automated builds and integration tests via \docker compose\. Documentation has been modernized by switching from ReadTheDocs to MkDocs, with a new \mkdocs.yml\ configuration and a \.readthedocs.yaml\ file to support the new build system. The repository structure has been cleaned up by removing the old \setup.py\ and \VERSION\ files, updating the \.gitignore\ to exclude new build artifacts, and refining the \MANIFEST.in\ to exclude test and documentation directories from the installed package.
(repo-wide) · high confidence
Behavioural changes
CQRS configuration validation and Django Admin sync action
The dj\_cqrs package now validates CQRS settings at startup, ensuring the transport is correctly configured and that master/replica settings (such as message TTL, retries, and correlation functions) meet expected types and constraints. Additionally, a new CQRSAdminMasterSyncMixin is available for Django Admin, allowing administrators to manually trigger CQRS synchronization for selected master model instances directly from the admin interface.
_dj\cqrs · high confidence
New CQRS controller layer for message routing and consumption
This change introduces the \dj\_cqrs.controller\ package, which centralizes the logic for handling CQRS messages. The \producer\ module now delegates message sending to the configured transport layer via \current\_transport.produce()\. The \consumer\ module provides a \consume\ entry point that processes incoming payloads by routing signals (SAVE, DELETE, SYNC) to the appropriate replica model methods. Key behavioral updates include copying payloads to prevent mutation, enforcing direct-sync restrictions via the \CQRS\_ONLY\_DIRECT\_SYNCS\ setting, supporting metadata via \CQRS\_META\, and handling database connection management and query timeouts for replica operations.
_dj\cqrs/controller · high confidence
New RabbitMQ and Kombu transport implementations with advanced message handling
The dj\_cqrs/transport module now includes dedicated transport implementations for RabbitMQ (using pika) and Kombu, replacing the previous generic structure. These transports introduce several behavioral changes: messages that fail processing or are malformed are explicitly rejected without requeuing (nack/reject with requeue=False), preventing infinite loops for bad data. The RabbitMQ transport adds support for manual acknowledgment, dead letter queues for expired messages, and a delay queue mechanism for retrying failed messages with configurable delays. Additionally, the consumer now supports filtering by specific CQRS IDs via an optional argument, and the RabbitMQ exchange is configured as durable. A LoggingMixin has been added to provide detailed, structured logging for all transport operations (produced, consumed, accepted, denied, failed, delayed, requeued, dead-lettered).
_dj\cqrs/transport · high confidence
Test coverage
Added Django test configuration and transport stubs; Added comprehensive test suite for Master model CQRS functionality; Added comprehensive tests for CQRS management commands; Added integration tests for CQRS replication and message handling; Added test coverage for Django management commands; Added test fixtures for Django master model serialization and tracking; Added test models for dj\_replica; Added tests for replica signal routing and mixin operations; Added unit tests for transport implementations; Initial test suite for Django CQRS library; New Dockerized integration test environment for CQRS transport compatibility.
Dependencies
Introduce Poetry-based dependency management and example project scaffolding
The project now uses Poetry for dependency management, adding a \pyproject.toml\ and \poetry.lock\ file that define the library as version 27.0.0 with support for Django 3.2 through 5.x and Python 3.10 through 3.12. An example demo project has been added under \examples/demo\_project/\, containing \master\_service\ and \replica\_service\ directories with their own \requirements.txt\ files pinning Django 3.2.20 and related dependencies like \djangorestframework\ and \django-cqrs\. Development tooling has also been updated to include Black 23.12.1 for code formatting and various flake8 plugins for linting.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 45 → 54 (+9.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 86 → 86 (-0.2)
- Architecture 97 → 97 (+0.1)
- Maturity 29 → 46 (+17.3)
- Readiness 53 → 56 (+3.4)
- Security 62 → 65 (+2.6)
- Domain Modelling 56 → 56 (+0.0)
Resolved (2)
- Leaked secret: signing-key (examples/demo_project/replica_service/app/settings.py)
- Off-boarding risk: anonymized user #1
New (2)
- Hotspot: dj_cqrs/management/commands/cqrs_sync.py (dj_cqrs/management/commands/cqrs_sync.py)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 5 commits — 3 feature/other, 2 fixes
By area
- (repo) — 2 commits
- (root) — 1 commit
- dj_cqrs/management — 1 commit
- dj_cqrs/transport — 1 commit
Notable commits
- fix: fix(cqrs_sync): reject a bad --delay or --batch before publishing
- fix: fix(transport): keep _create_connection() free of the producer cache
- change: Merge pull request #185 from cloudblue/request-scoped-producer-connection
- change: Merge pull request #186 from cloudblue/cqrs-sync-delay-between-batches
- change: feat(cqrs_sync): add --delay to pause between batches
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
cloudblue/django-cqrs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f99435bb032c2eda70d1ffa71b86d7e9b2296a5c — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.4+preprod-464a0040a931.