---------------------------------------------------------------------- This is the API documentation for the gdtest_skill_combo library. ---------------------------------------------------------------------- ## Classes Core classes Router(prefix: str = '', deps: dict | None = None) A synchronous HTTP router. Parameters ---------- prefix URL prefix for all routes. deps Dependency injection mapping. AsyncRouter(prefix: str = '', deps: dict | None = None) An asynchronous HTTP router. Inherits from :class:`Router` but supports async handlers. Parameters ---------- prefix URL prefix for all routes. deps Dependency injection mapping. Request(method: str = 'GET', path: str = '/', headers: dict | None = None, body: str = '') An incoming HTTP request. Parameters ---------- method HTTP method (GET, POST, etc.). path Request path. headers Request headers. body Request body. Response(status: int = 200, body: str = '', headers: dict | None = None) An HTTP response. Parameters ---------- status HTTP status code. body Response body. headers Response headers. Middleware(name: str = '') Base class for middleware. Parameters ---------- name Middleware identifier. ## Functions Public functions route(method: str, path: str) Decorator to register a route handler. Parameters ---------- method HTTP method. path URL path pattern. Returns ------- callable Decorated handler function. ---------------------------------------------------------------------- This is the User Guide documentation for the package. ---------------------------------------------------------------------- ## Installation Install gdtest-skill-combo from PyPI: ```bash pip install gdtest-skill-combo ``` ## Your first router Create a router and register a handler: ```python from gdtest_skill_combo import Router app = Router() app.get("/hello", lambda req: Response(body="Hello!")) ``` ## Adding middleware Middleware wraps every request: ```python def timer(req, next_handler): import time start = time.time() resp = next_handler(req) print(f"Took {time.time() - start:.3f}s") return resp app.use(timer) ```