start project

This commit is contained in:
Hemmat
2026-08-07 21:17:17 +03:30
commit ea1e1eead6
121 changed files with 8108 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
"""Shared HTTP status-code bucketing — used by the aggregator (per-IP
rollup) and available for any endpoint needing the same 2xx/3xx/4xx/5xx
buckets, so there's one bucketing rule, not several copies."""
from __future__ import annotations
def status_bucket(status_code: int) -> str:
if status_code < 300:
return "2xx"
if status_code < 400:
return "3xx"
if status_code < 500:
return "4xx"
return "5xx"