Wheezy: A No Bullshit Python Web Framework.

My web framework choice is always simple. If I’m dealing with a big project consisting of many pages/apps I’ll choose Django, if I want to prototype something or make a mini-app I’ll go with Flask or Bottle. Nowadays I just choose the framework I’m familiar with but originally my choice involved some sort of comprehensive framework review to make sure it was worth my invested time. However, this comprehensive review never consisted of a performance check; most python web frameworks were plenty fast and pre-mature optimization would be a waste of time. When developing the http/rest api for GAuthify performance became important and I stumbled upon Wheezy. Heres are some quick thoughts.

Wheezy.web is fast

For me it wasn’t really a case of pre-mature optimization. When I built the API I decided to spend extra time planning before so I would have to make minimal adjustments in production. After using Django for the API and testing it with Apache Benchmark, I wasn’t really satisfied by the perfomrance. Luckily the API code was well separated from Django so I began search for a new framework to swap it.

I found this post on Andriy Kornatskyy’s blog, the creator of wheezy and looking over his data I decided to test out bottle and wheezy.web

My results were phenomenal for wheezy and alright for bottle although it took a bit longer to get it to work in wheezy. My requests-per-second was factors better especially at higher concurrencies.

Wheezy is light but complete

Wheezy is a collection of tools that make it a complete web framework. The tools include wheezy.web, wheezy.http, wheezy.routing, wheezy.core, wheezy.captcha, etc. All these parts work completely independently of the others and can be mixed and matched when needed. This leads to one of my other favorite things about the framework: no bullshit. There’s not a lot of magic going on in the background with hundreds of function calls and with 500 point stacktraces. This allows you to easily dig in the code, make modifications to make wheezy work the way you need it to. The minimalism is probably what gives it very similar performance to Python’s wsgi.

Wheezy is still under development

There are some issues you’re going to run into. For example regex groups using {} can get picked up by the curly routing (instead of the regex routing). However, the cleanliness of the framework makes is easy to go through and submit fixes for the issues. The lack of documentation can also be irritating  but again the framework’s clarity makes it easy to figure out what the code is doing.

In short

Performance and clarity are often two non-primary features when looking for a web-framework. If you seek them though, wheezy has my vote for a great overall webframework for python. TL;DR from the documents: is a lightweight, high performance, high concurrency WSGI web framework with the key features to build modern, efficient web.

Make sure you check it out here.

Also read...


  1. Thank you. The benchmarks also include routing, reverse url and caching – foundation of any web application.

    The efficiency is in every aspect of wheezy.web framework. The most distinguished feature of wheezy.web is content caching. You are able to manage content cache through cache dependencies (and invalidate as needed). This enables you serve real world application at the speed of `hello world`.

    Consider take a look at template engine benchmarks:
    1. http://mindref.blogspot.com/2012/07/python-fastest-template.html
    2. http://mindref.blogspot.com/2012/10/python-templates-benchmark.html


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>