Coverage for src / taipanstack / utils / __init__.py: 100%
11 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 14:54 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 14:54 +0000
1"""Utility modules for Stack."""
3from .cache import cached
4from .concurrency import OverloadError, limit_concurrency
5from .context import (
6 correlation_id_var,
7 correlation_scope,
8 get_correlation_id,
9 set_correlation_id,
10)
11from .filesystem import WriteOptions, ensure_dir, safe_read, safe_write
12from .logging import (
13 REDACTED_VALUE,
14 SENSITIVE_KEY_PATTERNS,
15 get_logger,
16 log_operation,
17 setup_logging,
18)
19from .rate_limit import RateLimiter, RateLimitError, rate_limit
20from .resilience import fallback, timeout
21from .retry import Retrier, RetryConfig, RetryError, retry
22from .serialization import default_encoder
23from .subprocess import SafeCommandResult, run_safe_command # nosec B404
25__all__ = (
26 "REDACTED_VALUE",
27 "SENSITIVE_KEY_PATTERNS",
28 "OverloadError",
29 "RateLimitError",
30 "RateLimiter",
31 "Retrier",
32 "RetryConfig",
33 "RetryError",
34 "SafeCommandResult",
35 "WriteOptions",
36 "cached",
37 "correlation_id_var",
38 "correlation_scope",
39 "default_encoder",
40 "ensure_dir",
41 "fallback",
42 "get_correlation_id",
43 "get_logger",
44 "limit_concurrency",
45 "log_operation",
46 "rate_limit",
47 "retry",
48 "run_safe_command",
49 "safe_read",
50 "safe_write",
51 "set_correlation_id",
52 "setup_logging",
53 "timeout",
54)