---
name: gdtest-skill-combo
description: >
  Build and serve HTTP APIs with gdtest-skill-combo. Supports
  sync and async routing, middleware, dependency injection,
  and static file serving.
license: MIT
compatibility: Requires Python >=3.10.
metadata:
  author: gdg-test-suite
  version: "2.0"
---

# gdtest-skill-combo

A lightweight, composable API router toolkit.

## Quick start

```python
from gdtest_skill_combo import Router, route

app = Router(prefix="/api/v1")

@route("GET", "/users")
def list_users(req):
    return Response(body='[{"name": "Alice"}]')

app.get("/users", list_users)
```

## When to use what

| Need | Use |
|------|-----|
| Simple sync API | `Router()` |
| Async handlers | `AsyncRouter()` |
| Add middleware | `router.use(fn)` |
| Serve static files | `router.static(url, dir)` |
| Decorate handlers | `@route("GET", "/path")` |
| Inject dependencies | `Router(deps={"db": db})` |

## Middleware

Middleware functions wrap request processing. They run in
**LIFO order** (last added runs first):

```python
def logging_middleware(req, next_handler):
    print(f"{req.method} {req.path}")
    return next_handler(req)

router.use(logging_middleware)
```

## Capabilities and boundaries

**What agents can configure:**

- Create routers with route registration
- Add middleware and dependency injection
- Serve static files
- Use async handlers for concurrent processing

**Requires human setup:**

- Deploying behind a production ASGI/WSGI server
- TLS certificate configuration
- Database connection setup

## Resources

- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Full documentation for LLMs
