This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.7.1 instead.
Reason given by maintainers: Base install fails to import without logging-suite; use 0.7.1 or later.
monitoring-suite
Formerly domain-suite. Imports moved under the monitoring_suite root (see the 0.7.0 changelog entry for the map).
Consolidated domain packages for Python services: typed errors, security context, API rate limiting, event monitoring, and cross-cutting aspects.
Overview
monitoring-suite brings together five complementary domain packages into a single distribution:
- monitoring_suite.errors: Typed domain error hierarchy with wrapping and chaining
- monitoring_suite.security: Security context management and authorization checks
- monitoring_suite.api_limiter: Request rate limiting and quota enforcement
- monitoring_suite.monitoring: Event monitoring and telemetry
- monitoring_suite.aspects: Composable decorators for logging, auth, throttling, error wrapping, and sensitivity masking
Each package keeps its API under the single monitoring_suite import root; the consolidation is organizational (single distribution, unified testing).
Installation
# Base install
uv add monitoring-suite
# With all optional extras (logging + sensitivity)
uv add "monitoring-suite[all]"
# Or select extras
uv add "monitoring-suite[logging]" # for logging-suite support
uv add "monitoring-suite[sensitivity]" # for logging-suite support
or with pip:
pip install monitoring-suite
pip install "monitoring-suite[all]"
Requires Python 3.11+.
Packages
monitoring_suite.errors
Typed domain error hierarchy with wrapping and chaining for Python services.
Public API:
DomainError, ErrorChain, WrapErrorsClient, wrap_errors, ChainLink, ChainVia, DomainClassifier, DomainCrossing.
Example:
from monitoring_suite.errors import DomainError, wrap_errors
class DatabaseError(DomainError):
domain = "database"
code = "db_connection_failed"
http_status = 503
retryable = True
@wrap_errors(as_=DatabaseError)
def fetch_user(user_id: str):
raise RuntimeError(f"Database connection failed for {user_id}")
try:
fetch_user("usr_123")
except DatabaseError as e:
print(f"Error domain: {e.domain}, code: {e.code}, http_status: {e.http_status}, retryable: {e.retryable}")
Output (Python 3.11+, monitoring-suite==0.5.0):
Error domain: database, code: db_connection_failed, http_status: 503, retryable: True
See docs/monitoring_suite/errors/ for full documentation.
monitoring_suite.security
Security context management and authorization checks.
Public API:
SecurityContext, SecurityContextManager, Principal, requires, tenant_scoped, Authorizer, Permission, PolicyDecision, SecretRef, SecretValue, security error classes.
Example:
from monitoring_suite.security import Principal, SecurityContext, SecurityContextManager, requires
# Create principal with required scope
principal = Principal(id="usr_123", scopes=frozenset(["admin.read"]))
ctx = SecurityContext(principal=principal, tenant_id="org_abc")
# Bind context for a request scope
manager = SecurityContextManager()
with manager.bind(principal=principal, tenant_id="org_abc"):
# Enforce authorization via decorator
@requires(permission="admin.read")
def admin_only_function():
return "Admin access granted"
result = admin_only_function()
print(result)
Output (Python 3.11+, monitoring-suite==0.5.0):
Admin access granted
See docs/monitoring_suite/security/ for full documentation.
monitoring_suite.api_limiter
Request rate limiting and quota enforcement.
Public API:
throttled, PolicyRegistry, RateLimit, ThrottlePolicy, TierRate, Period, RateLimitExceeded, throttle error classes.
Example:
from monitoring_suite.api_limiter import throttled
@throttled(scope="api.documents", rate="100/hour")
def create_document(title: str):
return {"id": "doc_123", "title": title}
result = create_document("My Document")
print(result)
Output (Python 3.11+, monitoring-suite==0.5.0):
{'id': 'doc_123', 'title': 'My Document'}
See docs/monitoring_suite/api_limiter/ for full documentation.
monitoring_suite.monitoring
Event monitoring and telemetry.
Public API:
monitored, MonitorRegistry, MetricSink, MetricEvent, Outcome, CollectingSink, NullSink, monitoring error classes.
Example:
from monitoring_suite.monitoring import monitored
@monitored(event="document.processed")
def process_document(doc_id: str):
return {"status": "success"}
result = process_document("doc_123")
print(result)
Output (Python 3.11+, monitoring-suite==0.5.0):
{'status': 'success'}
See docs/monitoring_suite/monitoring/ for full documentation.
monitoring_suite.aspects
Composable decorators for logging, auth, throttling, error wrapping, and sensitivity masking.
Public API:
aspects, Logged, Requires, Throttled, TenantScoped, WrapErrors, Sensitive, AspectEntry, AspectKind, aspect error classes.
Example:
from monitoring_suite.aspects import aspects, Logged, Throttled
from monitoring_suite.security import Principal, SecurityContextManager
from logging_suite.logging import LoggingMixin
class DocumentService(LoggingMixin):
@aspects(
Logged(event="document.create"),
Throttled(scope="api.documents", rate="100/hour"),
)
def create_document(self, title: str, content: str) -> dict:
return {"id": "doc_123", "title": title}
principal = Principal(id="usr_123")
manager = SecurityContextManager()
with manager.bind(principal=principal, tenant_id="org_abc"):
service = DocumentService()
result = service.create_document("My Doc", "Content here")
print(result)
Output (Python 3.11+, monitoring-suite==0.5.0):
{'id': 'doc_123', 'title': 'My Doc'}
See docs/monitoring_suite/aspects/ for full documentation.
Consolidated From
This distribution consolidates five independent domain packages (monitoring_suite.errors, monitoring_suite.security, monitoring_suite.api_limiter, monitoring_suite.monitoring, and monitoring_suite.aspects) into a single unified distribution to simplify dependency management and testing.
Each package retains its original public API and namespace. Internal dependencies between packages within the suite are resolved locally (no external package re-imports required).
Optional Extras
[logging]: Integrates withlogging-suite>=0.7.0for structured event logging adapters.[sensitivity]: Integrates withlogging-suite>=0.7.0for automatic PII/PHI field masking.[all]: Includes logging-suite and boto3.
Future versions may introduce new extras or migrate integrations (e.g., if logging-suite consolidates further).
Development
Install development dependencies:
uv sync --all-extras
Run tests:
uv run pytest
Run linting and type checking:
ruff check .
ruff format --check .
mypy
License
Apache License 2.0. See LICENSE for details.
Contributing
See CONTRIBUTING.md for guidelines.
Metadata
Release files for monitoring-suite 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| monitoring_suite-0.7.0.tar.gz | 276.8 kB | With provenance | Details for monitoring_suite-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monitoring_suite-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for monitoring_suite-0.7.0-py3-none-any.whl |
Total release size: 358.1 kB
Release files / monitoring_suite-0.7.0.tar.gz
| Download URL | monitoring_suite-0.7.0.tar.gz |
|---|---|
| Size | 276.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e8eb07668ba41c4b657559d9be39f9d1aa642a978099c7a0c8518051128d3bf
|
|
BLAKE2b-256 checksum How to use checksums |
49537cdc3251ec4b637cd4509251535b41eab02aee968135379cfafee3bbcadb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / monitoring_suite-0.7.0-py3-none-any.whl
| Download URL | monitoring_suite-0.7.0-py3-none-any.whl |
|---|---|
| Size | 81.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2aefe953f818eb73d760d7529d5290c60ef35429200c8b4a8e5e39c4113bcac2
|
|
BLAKE2b-256 checksum How to use checksums |
b109bade0d731a9c824a53714a7431a5200ad5fd2d3e23ed5f716b0d0d81686c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for monitoring-suite 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for monitoring_suite-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.