Micro web framework around asyncio (ex tulip), similiar to the cyclone or tornado
Python Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs GET and POST :attr: Jan 8, 2014
rainfall ability to use shared event loop Apr 28, 2014
.gitignore HTTP headers support for responses, ETags support, minor improvements Jan 8, 2014
CHANGELOG.txt v 0.8.3 Jan 8, 2014
LICENSE.md Create LICENSE.md May 4, 2014
MANIFEST
MANIFEST.in
README.md Update README.md Dec 16, 2014
TODO.txt ws support in test client and simple ws test Apr 28, 2014
requirements.txt ws support in test client and simple ws test Apr 28, 2014
setup.py long_description Jan 8, 2014

README.md

Latest news

I have temporary (or forever) stopped developing rainfall and switched to aiohttp, which includes a nice high level web framework: http://aiohttp.readthedocs.org/en/latest/web.html

Quickstart

To start off, rainfall is a micro web framework around asyncio (ex tulip), similiar to the cyclone or tornado. Since it is asyncio based, rainfall is fully asyncronous.

Websocket support is work in progress, should be released soon.

Installation

As simple as::

pip install rainfall

.. note:: sometimes pip for python 3 is called pip3, but you may have it with other name

Hello world

Let's create a simple hello world app in example.py file like this::

import asyncio
from rainfall.web import Application, HTTPHandler


class HelloHandler(HTTPHandler):
    @asyncio.coroutine
    def handle(self, request):
        return 'Hello!'


app = Application(
    {
        r'^/$': HelloHandler(),
    },
)

if __name__ == '__main__':
    app.run()

Now you can run it by::

python3 example.py

And go to http://127.0.0.1:8888 in browser, you should see "Hello!"

Docs

For documentation go to http://rainfall.readthedocs.org/

More examples here https://github.com/mind1master/rainfall/blob/master/rainfall/tests/app.py

Credits

Author: Anton Kasyanov (https://github.com/mind1master/)

Contributors: mksh (https://github.com/mksh)