Skip to content

Commit

Permalink
Include description in documentation index; remove code from README
Browse files Browse the repository at this point in the history
  • Loading branch information
hfaran committed Feb 17, 2014
1 parent 50ab27f commit 731dcb6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 75 deletions.
22 changes: 1 addition & 21 deletions README.md
Expand Up @@ -11,31 +11,11 @@ Tornado-JSON is a small extension of [Tornado](http://www.tornadoweb.org/en/stab

Some of the key features the included modules provide:

* Input and output [JSON Schema](http://json-schema.org/) validation by decorating RequestHandlers
* Input and output [JSON Schema](http://json-schema.org/) validation by decorating RequestHandlers with `io_schema`
* Automated *route generation* with `routes.get_routes(package)`
* *Automated Public API documentation* using schemas and provided descriptions
* Standardized output using the [JSend](http://labs.omniti.com/labs/jsend) specification

Probably want an example? Here's a somewhat contrivedly simple handler.
Read on for more details or [dive in to some demos right away](https://github.com/hfaran/Tornado-JSON/tree/master/demos/helloworld)

```python
class HelloWorldHandler(APIHandler):

apid = {}
apid["get"] = {
"input_schema": None,
"output_schema": {"type": "string"},
"input_example": None,
"output_example": "Hello world!",
"doc": """Shouts hello to the world!""",
}

@io_schema
def get(self):
return "Hello world!"
```

### [Read the Docs for documentation!](http://tornado-json.readthedocs.org/en/latest/index.html#)

<sub>*Warning: Tornado-JSON is still very much a work in progress. No guarantees on backwards-compatibility made, however, I try not to do that since, as a user, I hate breaking it at least as much as you. That being said, use it at your own risk.*</sub>
Expand Down
36 changes: 8 additions & 28 deletions README.rst
Expand Up @@ -10,8 +10,10 @@ Tornado-JSON
Overview
--------

Tornado-JSON is a small extension of `Tornado <http://www.tornadoweb.org/en/stable/>`__ with the intent providing
the tools necessary to get a JSON API up and running quickly. See
Tornado-JSON is a small extension of
`Tornado <http://www.tornadoweb.org/en/stable/>`__ with the intent
providing the tools necessary to get a JSON API up and running quickly.
See
`demos/helloworld/ <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>`__
Expand All @@ -20,41 +22,20 @@ in the documentation.
Some of the key features the included modules provide:

- Input and output `JSON Schema <http://json-schema.org/>`__ validation
by decorating RequestHandlers
by decorating RequestHandlers with ``io_schema``
- Automated *route generation* with ``routes.get_routes(package)``
- *Automated Public API documentation* using schemas and provided
descriptions
- Standardized output using the
`JSend <http://labs.omniti.com/labs/jsend>`__ specification

Probably want an example? Here's a somewhat contrivedly simple handler.
Read on for more details or `dive in to some demos right away. <https://github.com/hfaran/Tornado-JSON/tree/master/demos/helloworld>`__

.. code:: python
class HelloWorldHandler(APIHandler):
apid = {}
apid["get"] = {
"input_schema": None,
"output_schema": {"type": "string"},
"input_example": None,
"output_example": "Hello world!",
"doc": """Shouts hello to the world!""",
}
@io_schema
def get(self):
return "Hello world!"
`Read the Docs for documentation! <http://tornado-json.readthedocs.org/en/latest/index.html#>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

\ *Warning: Tornado-JSON is still very much a work in progress. No
guarantees on backwards-compatibility made, however, I try not to do
that since, as a user, I hate breaking it at least as much as you. That
being said, use it at your own risk.*\
being said, use it at your own risk.*\

Dependencies
============
Expand All @@ -67,12 +48,11 @@ These dependencies can be satisfied by running
- tornado
- jsonschema


.. |Build Status| image:: https://travis-ci.org/hfaran/Tornado-JSON.png?branch=master
:target: https://travis-ci.org/hfaran/Tornado-JSON
.. |PyPI version| image:: https://badge.fury.io/py/Tornado-JSON.png
:target: http://badge.fury.io/py/Tornado-JSON
.. |Coverage Status| image:: https://coveralls.io/repos/hfaran/Tornado-JSON/badge.png?branch=master
.. |Coverage Status| image:: http://coveralls.io/repos/hfaran/Tornado-JSON/badge.png?branch=master
:target: https://coveralls.io/r/hfaran/Tornado-JSON?branch=master
.. |Stories in Ready| image:: https://badge.waffle.io/hfaran/Tornado-JSON.png?label=ready
.. |Stories in Ready| image:: https://badge.waffle.io/hfaran/Tornado-JSON.png?label=In_Progress
:target: http://waffle.io/hfaran/Tornado-JSON
34 changes: 8 additions & 26 deletions docs/index.rst
Expand Up @@ -6,42 +6,24 @@
Tornado-JSON
========================================

``Tornado-JSON`` is a small extension of `Tornado <http://www.tornadoweb.org/en/stable/>`__ with the intent providing
the tools necessary to get a JSON API up and running quickly.
Tornado-JSON is a small extension of `Tornado <http://www.tornadoweb.org/en/stable/>`__ with the intent providing
the tools necessary to get a JSON API up and running quickly. See
`demos/helloworld/ <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.

Some of the key features the included modules provide:

- Input and output `JSON Schema <http://json-schema.org/>`__ validation
by decorating RequestHandlers
by decorating RequestHandlers with ``io_schema``
- Automated *route generation* with ``routes.get_routes(package)``
- *Automated Public API documentation* using schemas and provided
descriptions
- Standardized output using the
`JSend <http://labs.omniti.com/labs/jsend>`__ specification

Probably want an example? Here's a somewhat contrivedly simple handler.
Read on for more details or `dive in to some demos right away. <https://github.com/hfaran/Tornado-JSON/tree/master/demos/helloworld>`__

.. code:: python
class HelloWorldHandler(APIHandler):
apid = {}
apid["get"] = {
"input_schema": None,
"output_schema": {"type": "string"},
"input_example": None,
"output_example": "Hello world!",
"doc": """Shouts hello to the world!""",
}
@io_schema
def get(self):
return "Hello world!"
Contents
--------
**Contents**:

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit 731dcb6

Please sign in to comment.