Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use simplejson when available; PEP8 compliance for imports #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions flaskext/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down