Skip to content
CAI
Software that uses CAICheck a score

dlski/python-mediator

58.3

Adequate · 9 November 2026

1.9k

lines of production code

Python

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Python-based mediator library that facilitates event-driven architecture and command handling. It provides mechanisms for transactional event aggregation, synchronous event bus processing, and flexible callable invocation with argument mapping and filtering. The codebase has been refactored to unify handler creation and improve inspection capabilities, while maintaining test coverage for the core mediation logic.

Behavioural changes

Added transactional event aggregation and synchronous event bus mode

The eventing system now supports transactional publishing via a new \EventAggregate\ class, which stages multiple events and commits them within a single transaction context. Additionally, \LocalEventBus\ and \EventHandlerRegistry\ have been updated to support a \sync\_mode\ parameter, allowing event handlers to be processed synchronously rather than as background tasks. The underlying registry and scheduler implementations have been refactored to use \ModifierFactory\ instead of \OperatorDef\, and the \EventPublisher\ interface now explicitly supports transactional contexts.

mediator/event · high confidence

Enhanced callable inspection with kwargs detection and async context manager

The \mediator/utils/inspection.py\ module now provides more detailed inspection of callables, including a new \has\kwargs\ field in \CallableIODetails\ to detect if a function accepts \\\*kwargs\. Additionally, a new \AsyncNullContextManager\ class has been added to \context.py\ to serve as a no-op async context manager. The test file \test\_inspection.py\ was moved to the new location.

mediator/utils · high confidence

Refactor handler creation and introduce argument strictness and filtering

The handler creation logic has been refactored: \DirectHandler\ and \MappedDirectHandler\ are replaced by a unified \CallableHandler\ that supports explicit subject name, argument mapping, and argument filtering. Policies now include an \arg\_strict\ option (defaulting to filtering injected keys by available arguments) to control whether excessive arguments are dropped. The \OperatorDef\ and \OperatorStack\ abstractions are replaced by \ModifierFactory\ and \ModifierStack\ for wrapping callables with extra behavior. Additionally, \CallableHandlerPolicyOwner\ is renamed to \MappablePolicy\.

mediator/common · high confidence

Test coverage

Removal of obsolete test files in tests/common; Removed obsolete event test suite; Tests moved from separate directory to example package.

Dependencies

Update python-mediator package metadata and Python version support

The python-mediator package has been updated to version 0.7.0, with the description expanded to include 'ES' (Event Sourcing). The project now explicitly supports Python versions 3.7 through 3.10 (previously 3.8+), and includes metadata such as package inclusion rules, readme, and classifiers for PyPI. Additionally, mypy has been added as a dev dependency for static 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 58 → 58 (+0.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 99 → 98 (-1.1)
  • Maturity 50 → 50 (+0.0)
  • Readiness 52 → 55 (+3.2)
  • Security 52 → 52 (+0.0)
  • Performance 100 → 100 (+0.0)

Findings

  • No change — the same findings as the prior survey.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dlski/python-mediator 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 0e09c18187fcd7a68dcdec3056608370ea1da75e — 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-bb0cb800cd0f.