Module Expr Str Assign NameStore Str ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias Assign NameStore ListLoad Str Str Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If UnaryOpNot Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If UnaryOpNot Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad body Raise Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler body If CompareEq AttributeLoad NameLoad attr Num body Raise Assign NameStore Dict Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Assign NameStore Str If BoolOpAnd Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Raise Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Call NameLoad NameStore body With Call AttributeLoad NameLoad attr keyword NameLoad keyword Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Call NameLoad NameLoad NameStore body With Call AttributeLoad NameLoad attr keyword NameLoad keyword Str NameStore body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return TupleLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num orelse If Call NameLoad NameLoad NameLoad body Return TupleLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num orelse If Call NameLoad NameLoad NameLoad body Return TupleLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num orelse If Call NameLoad NameLoad NameLoad body Return TupleLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Return TupleLoad Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareLt NameLoad Num NameLoad Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpAnd CompareIsNot NameLoad NameLoad CompareLt Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad decorator_list
N/A N/A WWW utility methods.

  ParseJSONRequest(): parses a JSON request body into python data structures
  ParseJSONResponse(): parses a JSON response body into python data structures
 N/A __author__ spencer@emailscrubbed.com (Spencer Kimball) contextlib closing cStringIO StringIO N/A gzip N/A json tornado escape web viewfinder.backend.base constants util viewfinder.backend.base.exceptions InvalidRequestError HttpForbiddenError NotFoundError viewfinder.backend.base.exceptions ServiceUnavailableError N/A _CONTENT_TYPES N/A application/json text/javascript N/A _CONFIRM_TIME_LIMIT N/A constants SECONDS_PER_HOUR ParseJSONRequest N/A N/A request N/A N/A N/A Parse the JSON-encoded contents of the request body and return
  the python data object.
   N/A content_type N/A N/A N/A request headers get Content-Type N/A N/A N/A any N/A N/A N/A content_type startswith x N/A x _CONTENT_TYPES N/A N/A N/A N/A web HTTPError 400 N/A bad request content type: %s content_type N/A json_dict N/A N/A json loads N/A request body N/A json_dict N/A ParseJSONResponse N/A N/A response N/A N/A N/A Parse the JSON-encoded contents of the response body and return
  the python data object.
   N/A content_type N/A N/A N/A response headers get Content-Type N/A N/A N/A any N/A N/A N/A content_type startswith x N/A x _CONTENT_TYPES N/A N/A N/A N/A web HTTPError N/A response code N/A %r N/A response headers N/A N/A N/A json_dict N/A N/A json loads N/A response body N/A N/A N/A N/A N/A N/A response code 200 N/A N/A N/A json_dict N/A error N/A response body N/A N/A N/A response code 200 N/A N/A error unknown N/A N/A N/A isinstance json_dict dict N/A N/A json_dict get error N/A N/A error N/A N/A json_dict get error N/A N/A N/A web HTTPError N/A response code N/A %s error N/A json_dict N/A GzipEncode N/A N/A s N/A N/A N/A Compresses 's' (which may be a byte or unicode string) with gzip and returns the result. N/A N/A closing N/A StringIO sio N/A N/A N/A N/A gzip GzipFile fileobj sio mode wb gzfile N/A N/A N/A N/A gzfile write N/A N/A escape utf8 s N/A N/A N/A sio getvalue N/A GzipDecode N/A N/A s N/A N/A N/A Decompresses 's' and returns the result as a byte string. N/A N/A closing N/A StringIO s sio N/A N/A N/A N/A gzip GzipFile fileobj sio mode rb gzfile N/A N/A N/A N/A gzfile read N/A HTTPInfoFromException N/A N/A value N/A N/A N/A Returns a tuple containing the HTTP status code and error message, based on the passed
  exception info.
   N/A N/A isinstance value N/A web HTTPError N/A N/A N/A N/A value status_code N/A value log_message N/A N/A N/A isinstance value InvalidRequestError N/A N/A N/A 400 N/A N/A value args N/A 0 N/A N/A N/A isinstance value HttpForbiddenError N/A N/A N/A 403 N/A N/A value args N/A 0 N/A N/A N/A isinstance value NotFoundError N/A N/A N/A 404 N/A N/A value args N/A 0 N/A N/A N/A isinstance value ServiceUnavailableError N/A N/A N/A 503 N/A N/A value args N/A 0 N/A N/A N/A 500 N/A str value N/A FormatIntegralLastKey N/A N/A value N/A N/A N/A Formats an integral last key as a string, zero-padding up to 15 digits of precision.

  15 digits is enough precision to handle any conceivable values we'll need to return.
   N/A N/A value 1000000000000000 value N/A N/A %015d value N/A IsConfirmedCookie N/A N/A confirm_time N/A N/A N/A Given the confirm time of a cookie, check that the cookie was confirmed no more than an
  hour ago. A recently confirmed cookie is required to perform certain high privilege operations,
  such as updating the password.
   N/A N/A N/A confirm_time None N/A N/A N/A util GetCurrentTimestamp N/A confirm_time _CONFIRM_TIME_LIMIT N/A