Python 2.7 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Python.
Stay organized with collections
Save and categorize content based on your preferences.
google.appengine.api.files.gs module
Summary
Files API.
Deprecated since version 1.8.1: Use Google Cloud Storage Client library instead.
Google Storage specific Files API calls.
Contents
- google.appengine.api.files.gs.create(filename, 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.
Parameters
-
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:
https://cloud.google.com/storage/docs/xml-api/reference-headers#xgoogacl
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.
ReturnsA 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).
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["This module, `google.appengine.api.files.gs`, provides specific Files API calls for interacting with Google Storage."],["The module is deprecated since version 1.8.1, and the Google Cloud Storage Client library should be used instead."],["The `create` function allows the creation of a writable Google Storage file with customizable parameters like MIME type, access control list (ACL), cache control, and user metadata."],["After creating the file, the file can be written to using the File API open function, or read from by calling `file::open` with the filename."]]],[]]