Sunday, September 07, 2025
All the Bits Fit to Print
Microdot: a tiny Python web framework for IoT and servers
Microdot is a tiny Python web framework designed to run on both CPython and MicroPython, enabling web servers on devices from IoT gadgets to full servers. Created by Miguel Grinberg to solve the lack of suitable MicroPython web frameworks, it is inspired by Flask but optimized for minimal resource usage.
Why it matters: Microdot enables lightweight web services on constrained hardware like ESP8266, expanding IoT device capabilities with web dashboards and APIs.
The big picture: It supports async programming, routing, cookies, streaming, TLS, and extensions, all within about 1,700 lines including optional modules.
Stunning stat: The core Microdot framework is only 765 lines of code, drastically smaller than Flask's 15,500 lines or Django's 110,000.
Commenters say: Users admire Microdot’s small size and MicroPython support but note that real-world use often requires larger dependencies, and some prefer API-first approaches like OpenAPI or gRPC.