# Path: shimehari/helpers.py
# def _assertHaveJson():
# def _assertHaveRedis():
# def getHandlerAction(resource, action):
# def getHostName(url):
#     def __init__(self):
#     def strip(self, htmlTag):
#     def handle_data(self, data):
# def urlFor(endpoint, **values):
# def findPackage(importName):
# def getModulesFromPyFile(targetPath, rootPath):
# def getRootPath(importName):
# def getEnviron():
# def sendFromDirectory(directory, filename, **options):
# def safeJoin(directory, filename):
# def sendFile(filenameOrFp, mimetype=None, asAttachment=False,
#              attachmentFilename=None, addEtags=True,
#              cacheTimeout=None, conditional=False):
# def jsonify(*args, **kwargs):
# def fillSpace(text, length):
#     def __init__(self, func, name=None, doc=None):
#     def __get__(self, obj, type=None):
# def getTemplater(app, templaterName, *args, **options):
# def flash(message, category='message'):
# def getFlashedMessage(withCategory=False, categoryFilter=[]):
#     def __init__(self, importName, appFolder='app',
#                   controllerFolder='controllers', viewFolder=None):
#         def _assetsURL(self):
#     def getStaticFolder(self, key):
#     def setStaticFolder(self, value):
#     def getStaticFolders(self):
#     def setStaticFolders(self, **folders):
#     def getStaticURL(self, key):
#     def setStaticURL(self, value):
#     def getStaticURLs(self):
#     def setStaticURLs(self, **urls):
#     def hasStaticFolder(self):
#     def sendStaticFile(self, filename):
#     def getSendFileMaxAge(self, filename):
#     def openFile(self, filename, mode='rb'):
# class Stripper(sgmllib.SGMLParser):
# class lockedCachedProperty(object):
# class _Kouzi(object):


import sys
import traceback
from werkzeug.exceptions import HTTPException, BadRequest
from shimehari.helpers import json
        ShimehariException.__init__(description)


class ShimehariSetupError(ShimehariException):
    def __str__(self):
        return 'ShimehariSetupError: %s' % self.description


class CommandError(Exception):
    def __init__(self, description):
        self.description = description

    def __str__(self):
        return 'CommandError: %s' % self.description


class DrinkError(Exception):
    def __init__(self, description, host='127.0.0.1', port=5959):
        self.description = description
        self.host = host
        self.port = port

    def __str__(self):
        return 'Shimehari Drink Command is Error: %s\nhost=%s\nport=%d' % (self.description, self.host, self.port)




class JSONHTTPExceptions(HTTPException):
    def get_body(self, environ):

# Path: shimehari/helpers.py
# def _assertHaveJson():
# def _assertHaveRedis():
# def getHandlerAction(resource, action):
# def getHostName(url):
#     def __init__(self):
#     def strip(self, htmlTag):
#     def handle_data(self, data):
# def urlFor(endpoint, **values):
# def findPackage(importName):
# def getModulesFromPyFile(targetPath, rootPath):
# def getRootPath(importName):
# def getEnviron():
# def sendFromDirectory(directory, filename, **options):
# def safeJoin(directory, filename):
# def sendFile(filenameOrFp, mimetype=None, asAttachment=False,
#              attachmentFilename=None, addEtags=True,
#              cacheTimeout=None, conditional=False):
# def jsonify(*args, **kwargs):
# def fillSpace(text, length):
#     def __init__(self, func, name=None, doc=None):
#     def __get__(self, obj, type=None):
# def getTemplater(app, templaterName, *args, **options):
# def flash(message, category='message'):
# def getFlashedMessage(withCategory=False, categoryFilter=[]):
#     def __init__(self, importName, appFolder='app',
#                   controllerFolder='controllers', viewFolder=None):
#         def _assetsURL(self):
#     def getStaticFolder(self, key):
#     def setStaticFolder(self, value):
#     def getStaticFolders(self):
#     def setStaticFolders(self, **folders):
#     def getStaticURL(self, key):
#     def setStaticURL(self, value):
#     def getStaticURLs(self):
#     def setStaticURLs(self, **urls):
#     def hasStaticFolder(self):
#     def sendStaticFile(self, filename):
#     def getSendFileMaxAge(self, filename):
#     def openFile(self, filename, mode='rb'):
# class Stripper(sgmllib.SGMLParser):
# class lockedCachedProperty(object):
# class _Kouzi(object):


# Path: shimehari/core/exceptions.py
import sys
import traceback
from werkzeug.exceptions import HTTPException, BadRequest
from shimehari.helpers import json

        ShimehariException.__init__(description)


class ShimehariSetupError(ShimehariException):
    def __str__(self):
        return 'ShimehariSetupError: %s' % self.description


class CommandError(Exception):
    def __init__(self, description):
        self.description = description

    def __str__(self):
        return 'CommandError: %s' % self.description


class DrinkError(Exception):
    def __init__(self, description, host='127.0.0.1', port=5959):
        self.description = description
        self.host = host
        self.port = port

    def __str__(self):
        return 'Shimehari Drink Command is Error: %s\nhost=%s\nport=%d' % (self.description, self.host, self.port)




class JSONHTTPExceptions(HTTPException):
    def get_body(self, environ):

        return json.dumps(dict(description=self.get_description(environ)))