Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.
Stay organized with collections Save and categorize content based on your preferences.

google.appengine.api.files.blobstore module


Files API.

Deprecated since version 1.8.1: Use Google Cloud Storage Client library instead.

Blobstore-specific Files API calls.


google.appengine.api.files.blobstore.create(mime_type='application/octet-stream', _blobinfo_uploaded_filename=None)source

Create a writable blobstore file.

  • mime_type – Resulting blob content MIME type as string.

  • _blobinfo_uploaded_filename – Resulting blob’s BlobInfo file name as string.


A file name for blobstore file. This file can be opened for write by File API open function. To read the file or obtain its blob key, finalize it and call get_blob_key function.


Get a blob key for finalized blobstore file.

  • create_file_name – Writable blobstore filename as obtained from create()

  • The file should be finalized. (function.) –


An instance of apphosting.ext.blobstore.BlobKey for corresponding blob or None if the blob referred to by the file name is not finalized.

  • google.appengine.api.files.InvalidFileNameError if the file name is not

  • a valid nonfinalized blob file name.


Get a filename to read from the blob.


blob_key – An instance of BlobKey.


File name as string which can be used with File API to read the file.