finds.dev

jczic/MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)

View on GitHubHomepage ↗

★ 662PythonMITupdated Jan 2023

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
662
Forks
118
Language
Python
License
MIT
Last commit
17 Jan 2023

// nearby

If MicroWebSrv isn't quite it.

All repos →