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.

google.appengine.api.blobstore.file_blob_storage module

Summary

In-memory implementation of Blobstore stub storage based on file system.

This module contains an implementation of blob_storage.BlobStorage that writes blobs directly to a file system.

Contents

class google.appengine.api.blobstore.file_blob_storage.FileBlobStorage(storage_directory, app_id)source

Bases: google.appengine.api.blobstore.blob_storage.BlobStorage

The storage mechanism that stores blob data on a local disk.

DeleteBlob(blob_key)source

Deletes blob data.

Deleting an unknown blob will not raise an error.

Parameters

blob_key – The blob key of an existing blob that you want to delete.

OpenBlob(blob_key)source

Opens a blob file for streaming.

Parameters

blob_key – The blob key of an existing blob that you want to open.

Returns

An open file stream to read the blob.

StoreBlob(blob_key, blob_stream)source

Stores a blob stream .

Parameters
  • blob_key – The blob key of the blob that you want to store.

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