Weird Web Server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/weirb
tests
.bumpversion.cfg
.gitignore
.pre-commit-config.yaml
.travis.yml
MANIFEST.in
README.md
bootstrap.sh
invoke.yaml
setup.py
tasks.py

README.md

Weirb

travis-ci codecov

Weird async web framework based on Newio!

Overview

from validr import T

class HelloService:
    async def do_say(
        self, name: T.str.maxlen(10).default("world")
    ) -> T.dict(message=T.str):
        return {"message": f"hello {name}!"}

Save as hello.py!

Run it weirb serve --name hello --debug!

Play in shell weirb shell --name hello --debug:

Wb> call('/hello/say', name='guyskk')

200 OK
Content-Length: 34
Content-Type: application/json;charset=utf-8

{
    "message": "hello guyskk!"
}

Install

Note: Python 3.6+

pip install weirb

Document

https://github.com/guyskk/weirb/wiki