GitHub: aiopyrestful
pyrestful
This is a Specialized version ofPyRestful
pyRestful is an API to develop restful services with Tornado Web Server.
We made changes from the last version to improve it and make it more easy.
The last version works with Python 2 and 3.
aiopyrestful
Support asyncio.
Install
pip install aiopyrestful
Example
import asyncio
from aiopyrestful.rest import get, mediatypes
async def async_fun():
await asyncio.sleep(10)
return 'text'
@get(_path='/configure', _produces=mediatypes.APPLICATION_JSON)
async def post_configure(self):
text = await async_fun()
return {
'text': text
}