← All work

Backend · Dev tool

Web Framework

A lightweight Python web framework built from scratch on raw sockets — HTTP parser, radix-tree router, middleware, template engine. Zero dependencies.

About

A lightweight Python web framework built from scratch on raw sockets with zero dependencies. It parses HTTP (query params, JSON body, form-urlencoded, URL decoding) and routes through a radix tree with dynamic params (:id), wildcards (*), and static priority. Runs on http://localhost:8080.

Features

  • Response helpers.json(), .html(), .redirect()
  • Middleware — Function-based with next(req) chaining
  • Template engine{{ var }}, {% for %}, {% if %} with caching

Stack

Python 3Raw socketsRadix tree router