Fiole is a new challenger in the category of the Python micro-frameworks. As you probably know, there are very good competitors in the market and we don’t really need a new one.
Read the introduction for a quick outline of the development guidelines for the Fiole framework.
So, how Fiole is different or similar to the others?
To sum up:
Of course the above comparison is partial and subjective.
Fiole is thread-safe and you can configure more than one application (for complex projects).
Fiole supports hooks which can be registered for each application. Moreover, the components of Fiole are well thought to allow extensibility. For example the template engine is configurable through attributes, and all the components of the template engine can be subclassed easily.
As an alternative, you can use any template engine, such as Jinja or Mako instead of the built-in template engine. There’s no specific integration between Fiole and the built-in template Engine.
Only the adapter for the wsgiref server is provided. You can write your own adapter for your preferred WSGI server. There are examples available in Bottle or itty.py source code for example.
First, I am not an expert about this topic. Still, there are various places where you can improve the performance of your web application. Some ideas that come to my mind:
The template engine is already very fast. Even so, you can achieve a better performance with small changes:
However the first thing to do is to benchmark your own application with realistic data in order to know where is the bottleneck before doing any random optimization.
Indeed, the template engine has some benefits: it is compact (~450 lines of code) and it is rather intuitive (basically, it’s Python syntax). It is derived from the wheezy.template package which is very fast.
The template engine can be used to process any kind of text.
The good news is that the template engine is not bound to the web framework. Currently there’s no plan to release it separately because Fiole is already a very small module and there’s nothing wrong using only one of its two components: the web framework or the template engine.
The source code is available on GitHub under the terms and conditions of the BSD license. Fork away!
The tests are run against Python 2.7, 3.2 to 3.4 and PyPy on the Travis-CI platform.
Project on PyPI: https://pypi.python.org/pypi/fiole