google.appengine.api.files.blobstore module

Summary

Files API.

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

Blobstore-specific Files API calls.

Contents

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

Create a writable blobstore file.

Parameters
  • mime_type – Resulting blob content MIME type as string.

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

Returns

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.

google.appengine.api.files.blobstore.get_blob_key(create_file_name)source

Get a blob key for finalized blobstore file.

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

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

Returns

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

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

  • a valid nonfinalized blob file name.

google.appengine.api.files.blobstore.get_file_name(blob_key)source

Get a filename to read from the blob.

Parameters

blob_key – An instance of BlobKey.

Returns

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