Skip to content

Instantly share code, notes, and snippets.

import urllib2
from urllib import urlencode
class APIRequest(urllib2.Request):
"""
Hack urllib2.Request so we can use custom HTTP requests like DELETE and PUT
"""
def set_method(self, method):
self.method = method.upper()
"""
Provides an example on how to create a server script for blueberry.
"""
import os
import sys
from signal import SIGTERM
from optparse import OptionParser
from routes.middleware import RoutesMiddleware