This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
=====================
bottle-api-json-formatting
=====================

A Bottle plugin which encapsulates results and errors in a json object. This
makes it much easier to build REST based api services with bottle.


Installation
===============

Install with one of the following commands:
```bash
$ pip install bottle-api-json-formatting
$ easy_install bottle-api-json-formatting
```
or download the latest version from github:
```bash
$ git clone git://github.com/bustleandflurry/bottle-api-json-formatting.git
$ cd bottle-api-json-formatting
$ python setup.py install
```


Usage
===============
```python
import bottle
import bottle_api_json_formatting

app = bottle.Bottle()
app.install(bottle_api_json_formatting.JsonFormatting())

@app.route('/')
def index():
return 'This is a test.'

@APP.route('/error')
def index():
raise Exception('This is an error.')

if __name__ == '__main__':
run(app, host='0.0.0.0', port=8080, debug=True)
```


Output
=============

Standard:
```
{
"status": "success",
"status_code": 0,
"data": "test"
}
```

Error:
```
{
"status": "error",
"status_code": 1,
"data": null,
"error": {
"status": "500 Internal Server Error",
"status_code": 500,
"message": "Internal Server Error"
}
}
```


Module Contents
=============

bottle\_api\_json\_formatting.**JsonFormatting**(*supported\_types=*['\*/\*'], *debug=False*)

*supported\_types* allows you to expressly set which Content-Types are acceptable for a json formatted response. When set any Content-Types not in the will be passed through untouched.

*debug* set to True will add the fields exception and traceback to error responses.
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bottle-api-json-formatting-0.1.1.linux-i686.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Dec 2, 2013
bottle-api-json-formatting-0.1.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Dec 2, 2013

Supported By

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