pyos / dogeweb

A functional web framework atop asyncio.

Home Page:http://pyos.github.io/dogeweb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dogeweb

asyncio + anonymous functions + the best language ever.

Usage

import '/dogeweb'
import '/dogeweb/r'
import '/dogeweb/property'  # allows to use `~> @stuff` instead of `req -> req.stuff`


app = dogeweb.app $ r.path
  '/', ~> 'Hello, World!'

See this example for something slightly more complex.

Usage, decorator-style

import dg
import dogeweb

root = dogeweb.r.path()

@root.route('/')
def hello(request):
    return 'Hello, World!'

app = dogeweb.app(root)

Running in development

app.run '0.0.0.0' 8000  # dg
app.run('0.0.0.0', 8000)  # python

Running in production

gunicorn -k dogeweb.gunicorn.Worker helloworld:app

About

A functional web framework atop asyncio.

http://pyos.github.io/dogeweb/

License:MIT License


Languages

Language:Python 100.0%