olivierphi/pymessagebus
52.2
Adequate · 8 November 2026
273
lines of production code
Python
primary language
7
measurements over time
What this system is
pymessagebus is a Python library that provides MessageBus and CommandBus implementations for routing and handling messages. It supports middleware chaining, handler locking, and dynamic handler registration or removal. The project is structured with a src layout and includes comprehensive testing, linting, and type checking via CI.
Features
Initial release of pymessagebus v1.2.3 with CI, linting, and packaging
This entry marks the initial public release of the pymessagebus library (version 1.2.3), establishing the project's foundational structure and quality gates. The release includes the core MessageBus and CommandBus implementations, supporting features such as middleware chaining, handler locking, and result handling options. To ensure code quality and reliability, the project integrates a comprehensive CI pipeline via Travis CI that enforces style and type checking using Black, Pylint, and MyPy, while also publishing code coverage metrics to Coveralls. The package is now properly packaged for distribution via PyPI, with installation instructions provided for both Poetry and pip, and is licensed under the MIT license.
(repo-wide) · high confidence
Removals
Removal of legacy MessageBus implementation
The legacy \MessageBus\ class and its associated \MessageHandlerNotFoundError\ have been removed from the \pymessagebus\ package. This deletion eliminates the basic message bus implementation that previously allowed multiple handlers per message type, indicating a shift in the library's architecture towards the newer, more structured components (such as \CommandBus\ and middleware support) introduced in recent commits.
pymessagebus · high confidence
Behavioural changes
Introduce handler removal and structured package layout
The MessageBus library now allows users to unregister specific handlers via the new \remove\_handler\ method on both \MessageBus\ and \CommandBus\, enabling dynamic management of message routing. Additionally, the package has been reorganized into a standard \src/\ layout, and the base \MessageBusError\ class now correctly inherits from \Exception\ instead of \BaseException\ for safer error handling.
src/pymessagebus · high confidence
Test coverage
Added comprehensive test coverage for message bus components
Added new and updated test files in the \tests/\ directory to verify the behavior of the \MessageBus\ and \CommandBus\ classes, including handler registration, middleware execution, locking mechanisms, and error handling. The tests also cover the singleton behavior and decorator-based handler registration in the \default\ module, as well as the logging middleware functionality.
tests · high confidence
Dependencies
Initial project setup with Poetry and dev tooling
The project is now managed using Poetry, introducing a \pyproject.toml\ configuration and a \poetry.lock\ file to pin development dependencies. This setup establishes the project as 'pymessagebus' version 1.2.3 and includes specific dev tools: pytest 6.2.2, pylint 2.7.2, mypy 0.812, and black 20.8b1, ensuring consistent code formatting, linting, and static type checking for Python 3.6+ environments.
(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 53 → 52 (-1.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 75 → 75 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 46 → 43 (-3.2)
- Readiness 45 → 45 (+0.0)
- Security 99 → 100 (+1.4)
Resolved (4)
- Inconsistent removal semantics between MessageBus and CommandBus. MessageBus.remove_handler requires both message_class and message_handler, implying multiple handlers per type are supported. CommandBus.remove_handler only requires message_class, implying a single handler per type. While this may be intentional design, the naming 'remove_handler' suggests similar functionality but with different arity, which is confusing.
- Medium CVE: [GHSA redacted] (poetry.lock)
- The default modules expose functions named 'register_handler' that take only a message_class, lacking the handler callable argument. This is inconsistent with the class-based APIs (add_handler) which require both class and callable. It is unclear if these functions are decorators, factories, or incomplete stubs.
- The public API CommandBus (src.pymessagebus.api.CommandBus) defines handle() returning None, while the internal implementation CommandBus (src.pymessagebus._commandbus.CommandBus) returns Any. This is a breaking contract inconsistency if the public API is intended to be the stable surface.
New (2)
- High CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
olivierphi/pymessagebus 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 8 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 4a64607531816adda2adba246a922b6cf3688adc — 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.3+preprod-45ab2cab63de.