// the find
jczic/MicroWebSrv
A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
MicroWebSrv is a minimal HTTP server for MicroPython on ESP32 and Pycom devices — three files, no dependencies, supports GET/POST routing, WebSockets, and a simple server-side templating language (.pyhtml). It's aimed at IoT developers who need a web interface or REST API baked into a microcontroller firmware. The author has since released MicroWebSrv2, which is the current recommended version.
The three-file design is genuinely appropriate for the target platform — flash storage on ESP32 is limited and you cannot afford heavy dependencies. Route decorators and variable routes work cleanly and the API surface is small enough to learn in an afternoon. WebSocket support as an optional add-on is the right call: you pay for it only if you need it. The .pyhtml templating covers conditionals, loops, and includes, which is more than you'd expect from something this size.
This repo is effectively archived — last commit was January 2023 and the README itself points you away to MicroWebSrv2, so adopting it means taking on unmaintained code. The threading model is fragile on MicroPython: each WebSocket connection spawns a new thread by default on a platform where the thread count ceiling is in the single digits. No TLS support at all, which matters for anything sending credentials over Wi-Fi. The templating engine executes arbitrary Python inside templates with no sandboxing, which is fine on a single-user device but worth knowing if you're building a captive portal anyone could reach.