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


Files API.

Deprecated since version 1.8.1: Use Google Cloud Storage Client library instead.

Google Storage specific Files API calls.

Contents, mime_type='application/octet-stream', acl=None, cache_control=None, content_encoding=None, content_disposition=None, user_metadata=None)source

Create a writable googlestore file.

  • filename – Google Storage object name (/gs/bucket/object)

  • mime_type – Blob content MIME type as string.

  • acl – Canned acl to apply to the object as per: If not specified (or set to None), default object acl is used.

  • cache_control – Cache control header to set when serving through Google storage. If not specified, default of 3600 seconds is used.

  • content_encoding – If object is compressed, specify the compression method here to set the header correctly when served through Google Storage.

  • content_disposition – Header to use when serving through Google Storage.

  • user_metadata – Dictionary specifying key value pairs to apply to the object. Each key is prefixed with x-goog-meta- when served through Google Storage.


A writable file name for a Google Storage file. This file can be opened for write by File API open function. To read the file call file::open with the plain Google Storage filename (/gs/bucket/object).