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.