Architecture¶
This section describes shekel's internal architecture: how budget enforcement works, how providers and observability plug in, and how the CLI runs user code under a budget.
Contents¶
- Overview — High-level design, entry points, and component diagram
- Core Components — Budget lifecycle, patching & providers, pricing, tools, observability, CLI
- Data Flow — Library and CLI call flows with sequence diagrams
- Module Map — File and module reference
- Extensibility — New providers, observability backends, temporal backends
- Concurrency & Safety — ContextVar, ref-counting, thread safety
Related docs¶
- How It Works — Monkey-patching, ContextVar, and ref-counting in more detail
- Extending Shekel — Custom providers, pricing, and temporal backends
- CLI Reference — All
shekel runand config options - API Reference — Full parameter and method reference