Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Str Str FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore NameLoad If CompareGt NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpSub Num NameLoad orelse If CompareLt NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpMult NameLoad Num Assign NameStore Call NameLoad Num BinOpSub NameLoad Num Assign NameStore BinOpAdd BinOpSub Num BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad NameLoad If CompareIs NameLoad NameLoad body If BoolOpOr CompareGt NameLoad NameLoad CompareGt NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad ListLoad Str Str body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad Call AttributeLoad Call NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If NameLoad body If Call AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num If Call AttributeLoad NameLoad attr Num body Assign NameStore NameLoad If BoolOpAnd NameLoad BoolOpOr CompareGt NameLoad NameLoad CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise Call NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Num If Call AttributeLoad NameLoad attr Num body If Call AttributeLoad NameLoad attr Num body AugAssignAdd NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num Slice Num Assign NameStore Call AttributeLoad NameLoad attr Num orelse If Call AttributeLoad NameLoad attr Num body AugAssignAdd NameStore Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num ListLoad Return ListLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad Str ListLoad TupleLoad Str NameLoad TupleLoad Str Str Return ListLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotEq SubscriptLoad NameLoad Index Str Str body Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num ListLoad Return ListLoad TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num ListLoad Return ListLoad decorator_list decorator_list
N/A N/A Handles dynamic serving of images from blobstore. N/A httplib N/A logging N/A re google.appengine.api apiproxy_stub_map google.appengine.api datastore google.appengine.api datastore_errors google.appengine.api.images images_service_pb N/A BLOBIMAGE_URL_PATTERN _ah/img(?:/.*)? N/A _BLOB_SERVING_URL_KIND __BlobServingUrl__ N/A _DEFAULT_SERVING_SIZE 512 N/A _SIZE_LIMIT 1600 N/A _OPTIONS_RE N/A N/A re compile ^s(\d+)(-c)? N/A _PATH_RE N/A N/A re compile /_ah/img/([-\w:]+)([=]*)([-\w]+)? N/A _MIME_TYPE_MAP N/A N/A N/A images_service_pb OutputSettings JPEG N/A N/A images_service_pb OutputSettings PNG N/A N/A images_service_pb OutputSettings WEBP image/jpeg image/png image/webp _get_images_stub N/A N/A N/A N/A N/A N/A N/A N/A apiproxy_stub_map apiproxy GetStub images N/A Error N/A Exception N/A N/A N/A InvalidRequestError N/A Error N/A N/A The request was invalid. N/A Application N/A object N/A N/A A WSGI application that handles image serving requests. _transform_image N/A N/A self blob_key options N/A N/A N/A Construct and execute a transform request using the images stub.

    Args:
      blob_key: A str containing the blob_key of the image to transform.
      options: A str containing the resize and crop options to apply to the
          image.

    Returns:
      A str containing the tranformed (if necessary) image.
     N/A N/A resize crop N/A N/A self _parse_options options N/A image_data N/A N/A images_service_pb ImageData N/A N/A N/A image_data set_blob_key blob_key N/A image N/A N/A N/A _get_images_stub _OpenImageData image_data N/A original_mime_type N/A image format N/A N/A width height N/A image size N/A crop N/A N/A crop_xform None N/A N/A width height N/A N/A crop_xform N/A N/A images_service_pb Transform N/A delta N/A N/A width height N/A width 2.0 N/A N/A N/A crop_xform set_crop_left_x delta N/A N/A N/A crop_xform set_crop_right_x N/A 1.0 delta N/A N/A N/A width height N/A N/A crop_xform N/A N/A images_service_pb Transform N/A delta N/A N/A height width N/A height 2.0 N/A top_delta N/A max 0.0 N/A delta 0.25 N/A bottom_delta N/A N/A 1.0 N/A 2.0 delta top_delta N/A N/A N/A crop_xform set_crop_top_y top_delta N/A N/A N/A crop_xform set_crop_bottom_y bottom_delta N/A crop_xform N/A N/A image N/A N/A N/A _get_images_stub _Crop image crop_xform N/A N/A resize None N/A N/A N/A N/A width _DEFAULT_SERVING_SIZE N/A height _DEFAULT_SERVING_SIZE N/A N/A resize _DEFAULT_SERVING_SIZE N/A resize N/A N/A resize_xform N/A N/A images_service_pb Transform N/A N/A N/A resize_xform set_width resize N/A N/A N/A resize_xform set_height resize N/A image N/A N/A N/A _get_images_stub _Resize image resize_xform N/A output_settings N/A N/A images_service_pb OutputSettings N/A output_mime_type N/A N/A images_service_pb OutputSettings JPEG N/A N/A original_mime_type N/A PNG GIF N/A N/A output_mime_type N/A N/A images_service_pb OutputSettings PNG N/A N/A N/A output_settings set_mime_type output_mime_type N/A N/A N/A N/A N/A _get_images_stub _EncodeImage image output_settings N/A _MIME_TYPE_MAP N/A output_mime_type N/A _parse_options N/A N/A self options N/A N/A N/A Parse an options string into a tuple containing the options.

    Currently this only supports resize and crop.

    Args:
      options: A str containing the url resize and crop options.

    Returns:
      A tuple (resize, crop) parsed from the string.

    Raises:
      InvalidRequestError: The requested resize is invalid.
     N/A match N/A N/A _OPTIONS_RE search options N/A resize None N/A crop False N/A match N/A N/A N/A N/A match group 1 N/A N/A resize N/A int N/A N/A match group 1 N/A N/A N/A match group 2 N/A N/A crop True N/A N/A resize N/A N/A resize _SIZE_LIMIT N/A resize 0 N/A N/A N/A N/A logging error Invalid resize: %r resize N/A N/A InvalidRequestError N/A N/A resize crop N/A _parse_path N/A N/A self path N/A N/A N/A Parse the request path into the blobkey and option string.

    Args:
      path: A str containing the path of the request.

    Returns:
      A tuple (blob_key, option) parsed out of the path.

    Raises:
      InvalidRequestError: The request path is invalid.
     N/A match N/A N/A _PATH_RE search path N/A N/A N/A match N/A N/A N/A match group 1 N/A N/A N/A N/A logging error Failed to parse image path "%s" path N/A N/A InvalidRequestError N/A options N/A blobkey N/A N/A match group 1 N/A N/A N/A match group 3 N/A N/A N/A N/A match group 2 N/A N/A blobkey N/A N/A N/A match group 2 N/A 1 N/A options N/A N/A match group 3 N/A N/A N/A N/A match group 2 N/A N/A blobkey N/A N/A match group 2 N/A N/A blobkey options N/A serve_image N/A N/A self environ start_response N/A N/A N/A Dynamically serve an image from blobstore. N/A N/A blobkey options N/A N/A self _parse_path N/A environ N/A PATH_INFO N/A key N/A N/A N/A datastore Key from_path _BLOB_SERVING_URL_KIND blobkey namespace N/A N/A N/A N/A N/A datastore Get key N/A N/A N/A N/A datastore_errors EntityNotFoundError N/A N/A N/A N/A logging error The blobkey %s has not registered for image serving. Please ensure get_serving_url is called before attempting to serve blobs. blobkey N/A N/A start_response N/A 404 %s N/A N/A httplib responses N/A 404 N/A N/A N/A N/A N/A image mime_type N/A N/A self _transform_image blobkey options N/A N/A start_response 200 OK N/A N/A Content-Type mime_type N/A Cache-Control public, max-age=600, no-transform N/A N/A image N/A __call__ N/A N/A self environ start_response N/A N/A N/A N/A N/A environ N/A REQUEST_METHOD GET N/A N/A N/A start_response N/A 405 %s N/A N/A httplib responses N/A 405 N/A N/A N/A N/A N/A N/A N/A N/A self serve_image environ start_response N/A N/A N/A InvalidRequestError N/A N/A N/A start_response N/A 400 %s N/A N/A httplib responses N/A 400 N/A N/A N/A N/A N/A