![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | content_type |
def | creation |
def | filename |
def | size |
def | md5_hash |
def | __init__ |
def | from_entity |
def | properties |
def | key |
def | delete |
def | open |
def | get |
def | all |
def | gql |
def | kind |
Information about blobs in Blobstore. This is a db.Model-like class that contains information about blobs stored by an application. Like db.Model, this class is backed by an Datastore entity, however, BlobInfo instances are read-only and have a much more limited interface. Each BlobInfo has a key of type BlobKey associated with it. This key is specific to the Blobstore API and is not compatible with db.get. The key can be used for quick lookup by passing it to BlobInfo.get. This key converts easily to a string, which is web safe and can be embedded in URLs. 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. All properties are read-only. Attempting to assign a value to a property will raise NotImplementedError.
def google.appengine.ext.blobstore.blobstore.BlobInfo.__init__ | ( | self, | |
entity_or_blob_key, | |||
_values = None |
|||
) |
Constructor for wrapping blobstore entity. The constructor should not be used outside this package and tests. Args: entity: Datastore entity that represents the blob reference.
def google.appengine.ext.blobstore.blobstore.BlobInfo.all | ( | cls | ) |
Get query for all Blobs associated with application. Returns: A db.Query object querying over BlobInfo's datastore kind.
def google.appengine.ext.blobstore.blobstore.BlobInfo.delete | ( | self, | |
_token = None |
|||
) |
Permanently delete blob from Blobstore.
def google.appengine.ext.blobstore.blobstore.BlobInfo.from_entity | ( | cls, | |
entity | |||
) |
Convert entity to BlobInfo. This method is required for compatibility with the current db.py query mechanism but will be removed in the future. DO NOT USE.
def google.appengine.ext.blobstore.blobstore.BlobInfo.get | ( | cls, | |
blob_keys | |||
) |
Retrieve BlobInfo by key or list of keys. Args: blob_keys: A key or a list of keys. Keys may be instances of str, unicode and BlobKey. Returns: A BlobInfo instance associated with provided key or a list of BlobInfo instances if a list of keys was provided. Keys that are not found in Blobstore return None as their values.
def google.appengine.ext.blobstore.blobstore.BlobInfo.gql | ( | cls, | |
query_string, | |||
args, | |||
kwds | |||
) |
Returns a query using GQL query string. See appengine/ext/gql for more information about GQL. Args: query_string: Properly formatted GQL query string with the 'SELECT * FROM <entity>' part omitted *args: rest of the positional arguments used to bind numeric references in the query. **kwds: dictionary-based arguments (for named parameters). Returns: A gql.GqlQuery object querying over BlobInfo's datastore kind.
def google.appengine.ext.blobstore.blobstore.BlobInfo.key | ( | self | ) |
Get key for blob. Returns: BlobKey instance that identifies this blob.
def google.appengine.ext.blobstore.blobstore.BlobInfo.kind | ( | self | ) |
Get the entity kind for the BlobInfo. This method is required for compatibility with the current db.py query mechanism but will be removed in the future. DO NOT USE.
def google.appengine.ext.blobstore.blobstore.BlobInfo.open | ( | self, | |
args, | |||
kwargs | |||
) |
Returns a BlobReader for this blob. Args: *args, **kwargs: Passed to BlobReader constructor. Returns: A BlobReader instance.
def google.appengine.ext.blobstore.blobstore.BlobInfo.properties | ( | cls | ) |
Set of properties that belong to BlobInfo. This method is required for compatibility with the current db.py query mechanism but will be removed in the future. DO NOT USE.