App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.ext.ndb.blobstore.BlobInfo Class Reference
Inheritance diagram for google.appengine.ext.ndb.blobstore.BlobInfo:
google.appengine.ext.ndb.model.Model google.appengine.ext.ndb.model._NotEqualMixin

Public Member Functions

def get
 
def get_async
 
def get_multi
 
def get_multi_async
 
def key
 
def delete
 
def delete_async
 
def open
 
- Public Member Functions inherited from google.appengine.ext.ndb.model.Model
def __init__
 
def __getstate__
 
def __setstate__
 
def __repr__
 
def __hash__
 
def __eq__
 
- Public Member Functions inherited from google.appengine.ext.ndb.model._NotEqualMixin
def __ne__
 

Static Public Attributes

tuple content_type = model.StringProperty()
 
tuple creation = model.DateTimeProperty()
 
tuple filename = model.StringProperty()
 
tuple size = model.IntegerProperty()
 
tuple md5_hash = model.StringProperty()
 
 put_async = _put_async
 
- Static Public Attributes inherited from google.appengine.ext.ndb.model.Model
 key = _key
 
 populate = _populate
 
 has_complete_key = _has_complete_key
 
 to_dict = _to_dict
 
 query = _query
 
 gql = _gql
 
 put = _put
 
 put_async = _put_async
 
 get_or_insert = _get_or_insert
 
 get_or_insert_async = _get_or_insert_async
 
 allocate_ids = _allocate_ids
 
 allocate_ids_async = _allocate_ids_async
 
 get_by_id = _get_by_id
 
 get_by_id_async = _get_by_id_async
 

Detailed Description

Information about blobs in Blobstore.

This is a Model subclass that has been doctored to be unwritable.

Properties:
- content_type: Content type of blob.
- creation: Creation date of blob, when it was uploaded.
- filename: Filename user selected from their machine.
- size: Size of uncompressed blob.
- md5_hash: The md5 hash value of the uploaded blob (in hex).

Additional API:

Class methods:
- get(): retrieve a BlobInfo by key
- get_multi(): retrieve a list of BlobInfos by keys
- get_async(), get_multi_async(): async version of get() and get_multi()

Instance methods:
- delete(): delete this blob
- delete_async(): async version of delete()
- key(): return the BlobKey for this blob
- open(): return a BlobReader instance for this blob

Because BlobInfo instances are synchronized with Blobstore, the class
cache policies are off.

Do not subclass this class.

Member Function Documentation

def google.appengine.ext.ndb.blobstore.BlobInfo.delete (   self,
  options 
)
Permanently delete this blob from Blobstore.

Args:
  **options: Options for create_rpc().
def google.appengine.ext.ndb.blobstore.BlobInfo.delete_async (   self,
  options 
)
Async version of delete().
def google.appengine.ext.ndb.blobstore.BlobInfo.get (   cls,
  blob_key,
  ctx_options 
)
Retrieve a BlobInfo by key.

Args:
  blob_key: A blob key.  This may be a str, unicode or BlobKey instance.
  **ctx_options: Context options for Model().get_by_id().

Returns:
  A BlobInfo entity associated with the provided key,  If there was
  no such entity, returns None.
def google.appengine.ext.ndb.blobstore.BlobInfo.get_async (   cls,
  blob_key,
  ctx_options 
)
Async version of get().
def google.appengine.ext.ndb.blobstore.BlobInfo.get_multi (   cls,
  blob_keys,
  ctx_options 
)
Multi-key version of get().

Args:
  blob_keys: A list of blob keys.
  **ctx_options: Context options for Model().get_by_id().

Returns:
  A list whose items are each either a BlobInfo entity or None.
def google.appengine.ext.ndb.blobstore.BlobInfo.get_multi_async (   cls,
  blob_keys,
  ctx_options 
)
Async version of get_multi().
def google.appengine.ext.ndb.blobstore.BlobInfo.key (   self)
Get key for blob.

Returns:
  BlobKey instance that identifies this blob.
def google.appengine.ext.ndb.blobstore.BlobInfo.open (   self,
  args,
  kwds 
)
Returns a BlobReader for this blob.

Args:
  *args, **kwargs: Passed to BlobReader constructor.

Returns:
  A BlobReader instance.

The documentation for this class was generated from the following file: