mercadona/rele
63.8
Adequate · 9 November 2026
1.6k
lines of production code
Python
primary language
9
measurements over time
What this system is
Relé is a Python library for managing Google Cloud Pub/Sub subscriptions, providing a CLI and Django/Flask integrations to simplify message consumption. It features automatic subscription discovery, configurable middleware for database and logging contexts, and robust retry policies. The system is designed to streamline worker setup and message handling within Django and Flask applications.
Features
Autodiscovery of subscription modules across app directories
The system now automatically detects subscription modules (files named 'subs' or 'subs.py') within Django app directories. This change introduces a new discovery mechanism in \rele/management/discover.py\ that scans app paths to identify and register these modules, enabling the framework to locate subscriptions regardless of their specific folder structure within an app.
rele/management · high confidence
New contrib middleware package for Flask, Django, and logging
The \rele.contrib\ package now provides a set of ready-to-use middleware components. This includes \FlaskMiddleware\ to manage Flask application contexts during message processing, \DjangoDBMiddleware\ to handle Django database connection lifecycle, and two logging options: \LoggingMiddleware\ for standard Prometheus-compatible metrics and \VerboseLoggingMiddleware\ which includes full message payload details in logs. Additionally, \UnrecoverableMiddleWare\ is available to automatically acknowledge messages that raise specific unrecoverable exceptions.
rele/contrib · high confidence
Behavioural changes
Modernize build tooling and drop Python 3.8/3.9 support
The project has shifted its development and build infrastructure to use \uv\ for dependency management (with \pyproject.toml\ and \uv.lock\ replacing \requirements.txt\ files) and \ruff\ for linting and formatting, replacing the previous \black\ and \isort\ tools. This change also enforces a minimum Python version of 3.10, dropping support for Python 3.8 and 3.9, and updates the Read the Docs configuration to use Python 3.12. Additionally, the public API is now fully typed with strict mypy checks, and releases are automated via release-please and PyPI trusted publishing.
(repo-wide) · high confidence
Relé 1.17.2: CLI, auto-discovery, and Django integration overhaul
This release introduces a new command-line interface (\rele run\) with automatic subscription and settings discovery, allowing users to start workers without manual configuration. It adds support for third-party subscriptions via the \--third-party-subscriptions\ flag and integrates with Django apps by automatically initializing the configuration in \ReleConfig.ready()\. The library now supports class-based subscriptions, configurable retry policies, and message filtering. Additionally, it deprecates the \GC\_CREDENTIALS\ setting in favor of \GC\_CREDENTIALS\_PATH\ and \GC\_PROJECT\_ID\, and updates the version to 1.17.2.
rele · high confidence
Rename runrele command and add showsubscriptions command
The Django management command previously named \runmaruja\ has been removed and replaced with \runrele\, which now starts subscriber threads to consume messages from Relé topics. Additionally, a new \showsubscriptions\ command has been added to list information about Pub/Sub subscriptions registered using Relé, displaying the topic, subscriber name, and associated function in a tabulated format.
rele/management/commands · high confidence
Test coverage
Added comprehensive test coverage for CLI, middleware, and subscription discovery
This change introduces a new test suite in the \tests/\ directory, adding 110 commits of test files to verify core library behaviors. The tests cover the \rele-cli\ command-line interface (including argument parsing for settings and third-party subscriptions), Django management commands (\runrele\, \showsubscriptions\), and various middleware implementations (Flask, Logging, Verbose Logging, and Unrecoverable Exception handling). Additionally, it includes tests for subscription discovery logic, configuration loading, and publisher client interactions, ensuring robust validation of the library's public API and internal components.
tests · high confidence
Dependencies
Migrate to pyproject.toml and adopt uv/hatchling build system
The project has consolidated its configuration and dependencies into a single pyproject.toml file, removing the legacy requirements.txt and requirements\_test.txt files. This change introduces the hatchling build backend and adopts uv for dependency management. The Python runtime requirement is now set to version 3.10 or higher, and the tooling stack has shifted from flake8/tox to ruff for linting and mypy for strict type checking.
(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 63 → 64 (+1.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 77 → 77 (+0.0)
- Architecture 96 → 94 (-2.7)
- Maturity 57 → 61 (+4.5)
- Readiness 55 → 55 (+0.0)
- Security 80 → 82 (+2.0)
Resolved (6)
- Documentation: no architecture or design documentation (README.md)
- Documentation: no project overview (docs/guides/flask.rst)
- Documentation: no project overview (docs/guides/unrecoverable_middleware.rst)
- Inconsistent parameter naming for publish success hooks. BaseMiddleware and LoggingMiddleware use 'data' and 'attrs', while VerboseLoggingMiddleware uses 'message_data' and 'message_attributes'.
- Inconsistent parameter naming for the exception object in failure hooks. BaseMiddleware and most implementations use 'exception', but UnrecoverableMiddleWare uses 'err'.
- Off-boarding risk: anonymized user #1
New (3)
- High CVE: [GHSA redacted] (uv.lock)
- Off-boarding risk: anonymized user #1
- Scattered collaborators
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mercadona/rele 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 7fc1b75b6e8a508cca639b121d87754971f5a4e6 — 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.