Skip to main content

Restful framework with Tornado

Project description

GitHub: aiopyrestful

This is a Specialized version of pyrestful

PyRestful

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


@asyncio.coroutine
async def async_fun():
    await asyncio.sleep(10)
    return 'text'


@get(_path='/configure', _produces=mediatypes.APPLICATION_JSON)
@asyncio.coroutine
async def post_configure(self):
    text = await async_fun()
    return {
        'text': text
    }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiopyrestful-1.4.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

aiopyrestful-1.4.1-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page