Overview

fiole.py is a WSGI micro-framework with the following development constraints:

  • Single file, no external dependency
  • Provide enough features to build a web application with minimal effort
  • Embed a compact template engine
  • Keep the module reasonably small

Main features:

Disclaimer: this framework is intentionally limited. If you need a robust and scalable solution, look elsewhere.

Link to the PyPI page: https://pypi.python.org/pypi/fiole

Tested against: Python 2.7, PyPy 2.2 and Python >= 3.2

Quickstart

Either download the single file fiole.py and save it in your project directory, or pip install fiole, preferably in a virtualenv.

Create an application and save it with name hello.py:

from fiole import get, run_fiole


@get('/')
def index(request):
    return 'Hello World!'

run_fiole()

Then run this example (default port 8080) with:

python hello.py

or (on port 4000 for example):

python fiole.py -p 4000 hello
# (or)
python -m fiole -p 4000 hello

Next steps

Clone the examples and run the demo:

git clone git://github.com/florentx/fiole.git
cd fiole/
python fiole.py examples

Open your browser and navigate through the examples: http://127.0.0.1:8080

Read the documentation about Routing requests and Build templates.

Some features are not yet covered in the documentation:

  • sending and receiving cookies
  • adding custom HTTP headers
  • stacking multiple applications
  • serving through a third-party WSGI server (gevent, ...)

Look at the Fiole API for some crispy details.

Read the documentation of Flask and Bottle for more information about web development in general.

Table Of Contents

Previous topic

Fiole’s documentation!

Next topic

Routing requests

This Page