Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guyskk/weirb
Weird Web Server
https://github.com/guyskk/weirb
Last synced: 29 days ago
JSON representation
Weird Web Server
- Host: GitHub
- URL: https://github.com/guyskk/weirb
- Owner: guyskk
- Created: 2018-06-17T11:57:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T13:48:17.000Z (almost 4 years ago)
- Last Synced: 2024-10-07T12:38:46.864Z (about 1 month ago)
- Language: Python
- Size: 125 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weirb
[![travis-ci](https://api.travis-ci.org/guyskk/weirb.svg)](https://travis-ci.org/guyskk/weirb) [![codecov](https://codecov.io/gh/guyskk/weirb/branch/master/graph/badge.svg)](https://codecov.io/gh/guyskk/weirb)
Weird async web framework based on Newio!
## Overview
```python
from validr import Tclass 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