Skip to main content
# Tornado-JSON

[![Join the chat at https://gitter.im/hfaran/Tornado-JSON](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hfaran/Tornado-JSON?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/hfaran/Tornado-JSON.png?branch=master)](https://travis-ci.org/hfaran/Tornado-JSON)
[![Coverage Status](https://coveralls.io/repos/hfaran/Tornado-JSON/badge.png)](https://coveralls.io/r/hfaran/Tornado-JSON?branch=master)
[![Documentation Status](https://readthedocs.org/projects/tornado-json/badge/?version=latest)](https://readthedocs.org/projects/tornado-json/?badge=latest)
[![Stories in Ready](https://badge.waffle.io/hfaran/Tornado-JSON.png?label=In_Progress)](http://waffle.io/hfaran/Tornado-JSON)

[![Latest Version](https://img.shields.io/pypi/v/Tornado-JSON.svg)](https://pypi.python.org/pypi/Tornado-JSON/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/Tornado-JSON.svg)](https://pypi.python.org/pypi/Tornado-JSON/)
[![Development Status](https://img.shields.io/pypi/status/Tornado-JSON.svg)](https://pypi.python.org/pypi/Tornado-JSON/)
[![Download format](https://img.shields.io/pypi/format/Tornado-JSON.svg)](https://pypi.python.org/pypi/Tornado-JSON/)
[![License](https://img.shields.io/pypi/l/Tornado-JSON.svg)](https://pypi.python.org/pypi/Tornado-JSON/)


## Overview

Tornado-JSON is a small extension of [Tornado](http://www.tornadoweb.org/en/stable/) with the intent of providing the tools necessary to get a JSON API up and running quickly.

Some of the key features the included modules provide:

* Input and output **[JSON Schema](http://json-schema.org/) validation** by decorating RequestHandlers with `@schema.validate`
* **Automated route generation** with `routes.get_routes(package)`
* **Automated [GFM](https://help.github.com/articles/github-flavored-markdown)-formatted API documentation** using schemas and provided descriptions
* **Standardized JSON output** using the **[JSend](http://labs.omniti.com/labs/jsend)** specification


## Usage

Check out the [Hello World demo](https://github.com/hfaran/Tornado-JSON/tree/master/demos/helloworld) for a quick example and the [accompanying walkthrough](http://tornado-json.readthedocs.org/en/latest/using_tornado_json.html) in the documentation. And then [**explore Tornado-JSON on readthedocs for the rest!**](http://tornado-json.readthedocs.org/en/latest/index.html#)

```python
import tornado.ioloop
from tornado_json.routes import get_routes
from tornado_json.application import Application

import mywebapp


# Automatically generate routes for your webapp
routes = get_routes(mywebapp)
# Create and start application
application = Application(routes=routes, settings={})
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
```

### Example Projects That Use Tornado-JSON

* https://github.com/hfaran/CitySportsLeague-Server
* https://github.com/hfaran/LivesPool


## Installation

* For the possibly stable

```bash
pip install Tornado-JSON
```

* For the latest and greatest

```bash
git clone https://github.com/hfaran/Tornado-JSON.git
cd Tornado-JSON
python setup.py develop
```


## Contributing

If there is something you would like to see improved, you would be awesome for [opening an issue about it](https://github.com/hfaran/Tornado-JSON/issues/new), and I'll promise my best to take a look.

Pull requests are absolutely welcome as well!


## License

This project is licensed under the MIT License.


## Running Tests

```bash
sudo pip2 install tox
sudo pip3 install tox
tox # Will run test matrix
```

Download files

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

Source Distribution

Tornado-JSON-1.3.4.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Tornado_JSON-1.3.4-py2-none-any.whl (16.4 kB view details)

Uploaded Python 2

File details

Details for the file Tornado-JSON-1.3.4.tar.gz.

File metadata

  • Download URL: Tornado-JSON-1.3.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for Tornado-JSON-1.3.4.tar.gz
Algorithm Hash digest
SHA256 079f55ee3cecbbbe0d71c0fd50c7f2bac474d5bb744ead1e1d3891650632ffc0
MD5 a02e5a17113d9b7b9e0dafc618b45873
BLAKE2b-256 0ae48885d884b9d099d1a5d5e7a98e6428b80d1cf24dceda18cbb558133fac8e

See more details on using hashes here.

File details

Details for the file Tornado_JSON-1.3.4-py2-none-any.whl.

File metadata

  • Download URL: Tornado_JSON-1.3.4-py2-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for Tornado_JSON-1.3.4-py2-none-any.whl
Algorithm Hash digest
SHA256 888b41a01516706cd083596c6cb2c1d5885c06e5b003f0ac8b65e8edf02ece55
MD5 84b4a6addc878ce048af769986cf42ae
BLAKE2b-256 9714a113e3572bec942c0fc68dfb8ca7f16d6d9011dfa651ca13d98908e709ba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.4 This release

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

0.41

1 file

0.40

1 file

0.31

1 file

0.30

1 file

0.20

1 file

0.14

1 file

0.13

1 file

0.12

1 file

0.11

1 file

0.10

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page