Karak
A Python backend framework with async handlers, typed inputs, and shared resources.
The project
Karak explores the pieces of a Python backend: routing requests, converting typed inputs, returning responses, and sharing resources across handlers. It follows my earlier work on Mitti.
A small starting point
A router holds the handlers, and a Karak application brings them together.
from karak import Karak, Router
router = Router()
@router.get("/")
async def hello():
return "Hello, world!"
app = Karak(router=router)
What it supports
- Async GET and POST handlers with typed path and query parameters.
- Text and byte responses, headers, cookies, and static files.
- Shared resources created at startup and reused across requests.
- Separate routers that can be combined as an application grows.
Project status
The repository is archived. Karak remains an experimental framework; the source and documentation record the implementation and its limitations.