diff --git a/flaskext/api.py b/flaskext/api.py index df96412..babec78 100644 --- a/flaskext/api.py +++ b/flaskext/api.py @@ -11,11 +11,21 @@ from __future__ import absolute_import -from flask import Response, request +from functools import wraps from time import time import traceback + +try: + import simplejson as json +except ImportError: + import json + +from flask import Response, request from flask import current_app +from apibee import Client as ApiBeeClient + + class ArgumentError(Exception):pass def _get_args(required, optional): @@ -35,7 +45,6 @@ def _get_args(required, optional): apiargs[arg] = optional[arg] return apiargs -from functools import wraps def api(required=None, optional=None): if required is None: required = {} @@ -67,10 +76,6 @@ def decorated_function(*args, **kwargs): # # Api Client # - -from apibee import Client as ApiBeeClient -import json - class ApiError(Exception): pass class Http404(Exception): pass