Skip to content

Instantly share code, notes, and snippets.

@nimbus154
nimbus154 / dictionary.py
Created April 21, 2013 23:54
An example of how to write functional tests for a RESTful API using the Bottle microframework.
from bottle import get, run, request, post, Bottle, abort, error, response, debug, redirect
# This is a dictionary endpoint. It retrieves definitions for words.
# You can also add words to the dictionary.
# this allows our bottle application to be accessible outside this file
app = Bottle()
dictionary = {
"lugubrious": "extremely sad",