Posted by pykello 9/7/2025
It also uses libraries for most "extensions" that are available, defeating the purpose and bending the claim that it's 1,700 lines of code including the extensions. Just jinja, one of the dependencies, is 18,000 lines of code. If that counts my Nanodot server which calls flask.app.run() is one line...
The only two extensions that use dependencies are the one that adds template rendering, and the one that implements secure user sessions.
For templates, you can use Jinja on CPython (where you wouldn't normally have space issues), or the uTemplate library (https://github.com/pfalcon/utemplate) on MicroPython, which is quite small.
For secure sessions, on CPython you have to add PyJWT. On MicroPython you need to add the HMAC and JWT modules from the MicroPython standard library, which are not installed by default. These are also very small.
How do you explain why virtually all frameworks end up requiring an order of magnitude more LoC?
I made a similar "framework" in PHP years back as an experiment and it was a couple hundred lines AT MOST.
Not necessarily. For example, some minimal web frameworks actually provide multiple routing strategies because different implementation strategy have tradeoffs.
In your own example, having multiple ways of declaring routing is not required to be considered usable.
So, yes.