scriptc
scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.
It consolidates multiple error-handling patterns (retry with various backoff strategies, circuit breaker, conditional retry, stateful retry) and modern features (sync/async, metrics, profiling, mock error injection) into one consistent API, reducing boilerplate significantly.
Calm error handling for Python – decorator-based, zero boilerplate.
Writing repetitive try / except blocks clutters your code and hides the business logic.
tranq gives you declarative error handling with decorators, context managers, and a rich set of retry strategies – so you can focus on what your code does, not how it recovers from failures.
| Feature | Description |
|---|---|
| 🧘 Tranquil | Clean, readable, and maintainable. |
| 🔁 Smart retries | Exponential, linear, Fibonacci backoff, jitter, and max delay. |
| 🚦 Circuit Breaker | Prevent cascading failures (sync & async). |
| 🧪 Conditional retry | On specific exceptions or result values. |
| 📦 Retry groups | All-or-nothing execution for multiple functions. |
| 📊 Built‑in metrics & profiling | Monitor performance and error rates. |
| 📝 Pluggable reporters | Send errors to files, Sentry, Slack, or custom destinations. |
| 🧩 Context manager API | Use tranq.retry(...) when decorators aren't ideal. |
| 🔧 Stateful retry | Persist attempt count across calls. |
| 🎭 Mock error injection | Test your error handling with ease. |
pip install tranq
Requires Python 3.9 or later.
@handle)import tranq
@tranq.handle(on=ValueError, retry=3, delay=0.5, backoff=2.0)
def risky():
# This will be retried up to 3 times with exponential backoff
...
@handle_async)@tranq.handle_async(on=ConnectionError, retry=2, fallback=lambda: "offline")
async def fetch_data():
...
cb = tranq.CircuitBreaker(failure_threshold=5, timeout=60)
@tranq.handle(circuit_breaker=cb)
def call_unstable_service():
...
with tranq.retry(on=ValueError, retry=2) as ctx:
result = ctx.run(my_function, arg1, arg2)
group = tranq.retry_group(step1, step2, step3, on=Exception, retry=1)
results = group.run() # if any step fails, all are retried together
Choose from exponential, linear, or Fibonacci backoff. Add jitter to avoid thundering herds.
@tranq.handle(
on=TimeoutError,
ret
Calm error handling for Python
Similar projects matched by category, topics, and programming language.
scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

flow is a minimalist terminal dashboard that displays real-time network throughput with smooth animations, multiple responsive modes, and zero configuration.

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.