Python 3.9 is now generally available.


Asynchronously obtains a URL that will serve the underlying image.

This URL is served by a high-performance dynamic image serving infrastructure. This URL format also allows dynamic resizing and cropping with certain restrictions. To dynamically resize and crop, specify size and crop arguments, or simply append options to the end of the default URL obtained via this call.


get_serving_url -> ""

To get a 32-pixel-sized version (aspect-ratio preserved), append =s32 to the URL::

To get a 32-pixel cropped version, append =s32-c::

Available sizes are any integer in the range [0, 1600] and is available as IMG_SERVING_SIZES_LIMIT.

blob_key The BlobKey, BlobInfo, string, or Unicode representation of the BlobKey of blob whose URL you require.
size Integer of the size of resulting images.
crop Boolean value. True requests a cropped image, while False requests a resized image.
secure_url Boolean value. True requests a https URL, while False requests a http URL.
filename The file name of a Google Storage object whose URL you require.
rpc Optional UserRPC object.

A UserRPC whose result will be a string that is the serving URL.

BlobKeyRequiredError If a blob key was not specified in the constructor.
UnsupportedSizeError If you specified an invalid size parameter.
BadRequestError If crop and size are present in the wrong combination, or if blob_key and filename are both specified.
TypeError If secure_url is not a boolean type.
AccessDeniedError If blob_key refers to a Google Storage object and the application does not have permission to access the object.