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.blobstore.blob_storage module

Summary

Definition of BlobStorage base class.

Contents

class google.appengine.api.blobstore.blob_storage.BlobStoragesource

Bases: object

Base class for defining how blobs are stored.

This base class merely defines an interface that all stub blob-storage mechanisms must implement.

DeleteBlob(blob_key)source

Delete blob data from storage.

Parameters

blob_key – Blob-key of existing blob to delete.

OpenBlob(blob_key)source

Open blob for streaming.

Parameters

blob_key – Blob-key of existing blob to open for reading.

Returns

Open file stream for reading blob. Caller is responsible for closing file.

StoreBlob(blob_key, blob_stream)source

Store blob stream.

Implement this method to persist blob data.

Parameters
  • blob_key – Blob key of blob to store.

  • blob_stream – Stream or stream-like object that will generate blob content.