orsinium-labs/walnats
63.2
Adequate · 22 September 2026
2.8k
lines of production code
Python
primary language
6
measurements over time
What this system is
This system is a Python library for building distributed event-driven applications using the NATS messaging protocol. It provides a structured framework for defining actors and events, managing message serialization, and handling concurrency through a context-based architecture. The library supports advanced features such as middleware integration for observability, flow control decorators, and automated generation of architectural diagrams and API specifications.
Features
Add NATS demo examples for publishing and subscribing to events
Added new example files in the readme\_demo directory to demonstrate the NATS library's event handling capabilities. The changes introduce a shared event definition (events.py), a publisher script (pub.py) that emits 1000 integer events, and a subscriber script (sub.py) that listens for and prints those events using the walnats library.
_examples/readme\demo · high confidence
Add d2 diagram generation example
A new example script, examples/diagram.py, has been added to demonstrate how to generate d2 diagrams for a walnats-based architecture. The script defines sample data classes and events, configures services with actors, and prints the d2 representation of the service graph, allowing users to visualize their architecture as a diagram.
examples · high confidence
Add hello\_world example demonstrating event publishing and subscribing
A new hello\_world example has been added to demonstrate the library's eventing capabilities. The example includes an events module defining a CounterModel and a COUNTER event, a pub.py script that acts as a publisher emitting sequential values, and a sub.py script that uses an actor to subscribe and print received values.
_examples/hello\world · high confidence
Add middleware infrastructure and integrations for observability and logging
The walnats package now includes a new middlewares module that provides a base class for message handling hooks and several concrete implementations. This includes integrations for distributed tracing (OpenTelemetry, Zipkin), metrics collection (Prometheus, Statsd/Datadog), and error reporting (Sentry). Additionally, the module provides utility middlewares for context management, structured logging, and deduplication/threshold-based error reporting.
walnats/middlewares · high confidence
Initial project scaffolding and configuration
The repository was initialized with essential configuration files including a .gitignore, .markdownlint.yaml, LICENSE (MIT), README.md, Taskfile.yml, netlify.sh, netlify.toml, and setup.cfg. These files establish the project's development environment, documentation build process, and coding standards.
(repo-wide) · high confidence
Introduce Actor-based event processing with execution and priority controls
Added a new \Actor\ class and supporting infrastructure in \walnats.\_actors\ to define event subscribers. Users can now configure handlers to run in the main thread, a thread pool, or a separate process pool via the \ExecuteIn\ enum. The \ConnectedActors\ class manages the lifecycle of these actors, including registering consumers and starting listeners. Additionally, a \Priority\ enum allows controlling the concurrency order of actors when the system is under load.
_walnats/\actors · high confidence
Introduce modular serialization framework with multiple backends
Added a new serialization subsystem in the walnats package that provides a unified interface for converting Python objects to and from binary payloads. The system includes a base Serializer class and a registry that automatically selects the appropriate serializer for various data types, including Pydantic models, dataclasses, marshmallow schemas, Protobuf messages, and standard Python primitives. It also supports optional integrations with msgpack and provides wrapper serializers for GZip compression, Fernet encryption, and HMAC signing.
walnats/serializers · high confidence
Introduce structured event handling with CloudEvents support and scheduled events
The library now provides a dedicated \\walnats.\_events\\ module for structured event management. Users can define and register events using the new \\Event\\ and \\EventWithResponse\\ classes, which support serialization, stream configuration, and message deduplication. The \\ConnectedEvents\\ class exposes methods to emit, request (synchronous response), and monitor events, with support for message delays and distributed tracing. Additionally, the module introduces \\Clock\\ for emitting periodic events (e.g., 'minute-passed') and \\CloudEvent\\ to handle metadata according to the CloudEvents specification, enabling interoperability with external systems. The \\Events\\ registry allows iteration and lookup of registered events.
_walnats/\events · high confidence
New decorators for flow control and error handling
Added four new decorators to the walnats library to manage handler execution: \filter\_time\ to run handlers only at specific times, \rate\_limit\ to cap concurrent job starts, \require\ to delay execution until a condition is met, and \suppress\ to silently ignore specified exceptions. These utilities provide flow control and error handling capabilities for handlers.
walnats/decorators · high confidence
Behavioural changes
Add static linting for event, actor, and limits definitions
A new internal linter module has been introduced to perform static analysis on Python code using the \ast\ module. The \Flake8Checker\ class and associated finders now validate \Event\, \Actor\, and \Limits\ definitions. Specifically, it enforces that event and actor names are non-empty, under 64 characters, free of invalid symbols, and follow kebab-case formatting. It also checks that event and actor descriptions are not empty and stay within a 4KB limit, while ensuring numeric limits (such as age) are positive and within expected ranges.
_walnats/\linter · high confidence
Reworked core architecture with new context, services, and task supervision
The library's internal structure has been significantly refactored. A new \Services\ class and \Service\ dataclass are introduced to describe system architecture, enabling the generation of D2 diagrams and AsyncAPI specifications. A \Tasks\ supervisor class is added to manage and supervise multiple async tasks. The previous \PubConnection\ and \SubConnection\ classes are removed in favor of a new \Context\ system (\Context\, \ErrorContext\, \OkContext\) that provides richer metadata about message delivery, tracing, and execution status. Additionally, new constants for NATS headers (reply, ID, trace, delay) and custom error types (\StreamExistsError\, \StreamConfigError\) are introduced to improve error handling and distributed tracing support.
walnats · high confidence
Test coverage
Added comprehensive test suite for the NATS client library; Added test coverage for events module; Added tests for actor execution, priority, and registry; Added tests for decorator functions.
Dependencies
Added pyproject.toml for project configuration
A new pyproject.toml file was added to the project, establishing the build system (flit\_core), project metadata (name, authors, license, Python version), and dependency groups. This includes the core 'nats-py' dependency, optional integrations (such as aiozipkin, datadog, opentelemetry-distro, prometheus-client, pydantic, sentry-sdk), and tooling for testing (pytest, hypothesis), linting (flake8, mypy), and documentation (sphinx).
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 58 → 63 (+5.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 96 → 97 (+1.5)
- Architecture 100 → 100 (+0.0)
- Maturity 54 → 54 (-0.3)
- Readiness 48 → 52 (+3.7)
- Security 63 → 87 (+24.7)
Resolved (15)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (9 lines × 2) (walnats/_linter/_finders.py)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- LLM evaluation failed
- No exposed public API
- Test reliability not included
- single-maintainer — knowledge-concentration (bus factor) risk
New (19)
- Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
- Documentation: no installation or build instructions (README.md)
- Duplicated block (19 lines × 2) (walnats/_linter/_finders.py)
- Duplicated block (6 lines × 2) (examples/hello_world/sub.py)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Hotspot: walnats/_actors/_actor.py (walnats/_actors/_actor.py)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- No ADRs found
- No dependency advisory monitoring
- TodoComment (walnats/middlewares/_integrations.py)
- Workflow token permissions not restricted
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
orsinium-labs/walnats 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 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7f77cb0bb7c4c23f4b2caccdde75c2473eea0a55 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.