Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

('A collection of routines for building web APIs on top of Tornado web server. ',)

Project Description

A collection of routines for building web APIs on top of Tornado web server.

Features

  • Automatic support multiple response formats (JSON, JSONP, XML)
  • Pluggable authentication
  • Error handling

Example usage

import apikit

# Returning objects as response (only basic JSON-encodable types supported):
class MyApiHander(apikit.ApiHandler):
    def get(self):
        self.write_response({'result' : 'sucess',
                             'x' : 1, y : [1,2,3]})

# Authentication:
class MyProtectedResourceBase(apikit.ProtectedResource):
    def authenticate(self, callback):
        if self.get_argument('password') != '12345':
            raise tornado.web.HTTPError(403, "Incorrect or missing password!")
        callback()

class MyProtectedResource(MyProtectedResourceBase):
    def get(self):
        ...

Installation

$ pip install tornado-api-kit

Release History

This version
History Node

0.0.1

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
tornado-api-kit-0.0.1.tar.gz
(2.6 kB) Copy SHA256 Hash SHA256
Source None Feb 15, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting