# Path: gap/conf.py
#     DEFAULT_SETTINGS = {}
#     KEY = 'app_settings'
# class AppSettings(ndb.Expando):
# class LazyAppSettings(object):
# class SettingsDict(object):
#     def get_key(cls):
#     def put(self, *args, **kwargs):
#     def get_uuid(cls):
#     def set_uuid(cls):
#     def __get__(self, instance, owner=None):
#     def _set_settings(self, dict_data):
#     def __getitem__(self, key):
#                 def new_setter(obj, key, value):
#     def __setitem__(self, key, value):
#     def add_setting(self, key, value):
#     def save(self):
#     def reload(self):
#     def del_setting(self, key):
#     def __hasitem__(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def values(self):
#     def __iter__(self):


import logging
import json
import time
from gap.conf import settings
from datetime import datetime, date
        from httplib import responses
                from traceback import format_exc

    def args_wrap(self, *args, **kwargs):
        exception = None
        self.response.headers['Content-Type'] = 'application/json; charset=utf-8'
        try:
            data = fn(self, *args, **kwargs)

            if data is not None:
                self.response.write(dumps(data, indent=4))
        except JsonException, exception:
            self.response.clear()
            self.response.status = exception.code
            data = {
                'error': {
                    'code': exception.code,
                    'message': exception.message,
                },
            }
        except Exception, exception:
            logging.exception(exception)
            self.response.clear()
            self.response.status = 500
            data = {
                'error': {
                    'code': 500,
                    'message': 'Internal Server Error',
                },
            }

        if exception:

# Path: gap/conf.py
#     DEFAULT_SETTINGS = {}
#     KEY = 'app_settings'
# class AppSettings(ndb.Expando):
# class LazyAppSettings(object):
# class SettingsDict(object):
#     def get_key(cls):
#     def put(self, *args, **kwargs):
#     def get_uuid(cls):
#     def set_uuid(cls):
#     def __get__(self, instance, owner=None):
#     def _set_settings(self, dict_data):
#     def __getitem__(self, key):
#                 def new_setter(obj, key, value):
#     def __setitem__(self, key, value):
#     def add_setting(self, key, value):
#     def save(self):
#     def reload(self):
#     def del_setting(self, key):
#     def __hasitem__(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def values(self):
#     def __iter__(self):


# Path: gap/utils/json_utils.py
import logging
import json
import time
from gap.conf import settings
from datetime import datetime, date
        from httplib import responses
                from traceback import format_exc


    def args_wrap(self, *args, **kwargs):
        exception = None
        self.response.headers['Content-Type'] = 'application/json; charset=utf-8'
        try:
            data = fn(self, *args, **kwargs)

            if data is not None:
                self.response.write(dumps(data, indent=4))
        except JsonException, exception:
            self.response.clear()
            self.response.status = exception.code
            data = {
                'error': {
                    'code': exception.code,
                    'message': exception.message,
                },
            }
        except Exception, exception:
            logging.exception(exception)
            self.response.clear()
            self.response.status = 500
            data = {
                'error': {
                    'code': 500,
                    'message': 'Internal Server Error',
                },
            }

        if exception:

            if settings['DEBUG']: