Introducing Drakken: a minimalist WSGI web framework written in Python.
Another Python web framework?
Yup another one. During the 2020 COVID lockdown I stumbled across this article on how to build a web framework in Python. The framework I was using at the time seemed overly-complex and crufty, and I was bored and looking for a new project so I decided to write my own: ten days for an alpha version, and another week to port my note taking app. Test-driven development really took the sting out of the endeavor.
Drakken is pretty simple under the hood: there’s a routing engine to route a request to the appropriate controller which issues a response, a session handling module allowing users to create accounts and log in, and a middleware module to modify a request before your app receives it or modify a response after your app processes it.
Drakken uses SQLAlchemy as the Object Relational Model (ORM) to read from and write to the database using Python objects instead of SQL queries. HTML pages are created using the Mako template engine. With a third-party ORM and template engine, all I had to do was glue these components together with the routing module and provide a session module.
Give it a try and let me know what you think.