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.
- Host: GitHub
- URL: https://github.com/cablehead/vanilla.bean
- Owner: cablehead
- Created: 2014-10-02T00:35:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-05T01:20:02.000Z (over 10 years ago)
- Last Synced: 2025-03-25T05:05:50.508Z (2 months ago)
- Language: Python
- Size: 246 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
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: terminalWebsockets
----------.. 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