An open API service indexing awesome lists of open source software.

https://github.com/cablehead/vanilla.bean

Obligatory Sinatra style (but concurrent!) micro-web framework for Vanilla.
https://github.com/cablehead/vanilla.bean

Last synced: 2 months ago
JSON representation

Obligatory Sinatra style (but concurrent!) micro-web framework for Vanilla.

Awesome Lists containing this project

README

        

|Vanilla| Welcome to Vanilla Bean!
==================================

Obligatory Sinatra style (but concurrent!) micro-web framework for
`Vanilla `__.

Example
-------

.. code:: python

h = vanilla.Hub()
b = h.bean(port=8000)

@b.get('/')
def index(request):
response = request.reply()
response.send('Hello ')
h.sleep(1000)
response.send('World\n')

.. figure:: https://github.com/cablehead/vanilla.bean/raw/master/docs/images/terminal.gif
:alt: terminal

Websockets
----------

.. code:: python

h = vanilla.Hub()
b = h.bean(port=8000)

@b.websocket('/echo')
def echo(ws):
while True:
ws.send(ws.recv())

Installation
------------

::

pip install vanilla.bean

.. |Vanilla| image:: http://vanillapy.readthedocs.org/en/latest/_static/logo.png