Downloading Your Source Code

You can download an application's source code by running the appcfg.py command with the download_app action. The appcfg.py download_app command is available through the original App Engine SDK for Python.

appcfg.py -A [YOUR_PROJECT_ID] -V [YOUR_VERSION_ID] download_app [OUTPUT_DIR]

where:

  • [YOUR_PROJECT_ID] is your Cloud Platform project ID.
  • [YOUR_VERSION_ID] is the version ID of your application that you want to download.
  • [OUTPUT_DIR] is the full directory path to where you want your files downloaded.

For more information about this command, see the appcfg.py download_app reference.

If the command is successful, you get output similar to the following:

Getting file list...
Fetching files...
Getting files...

[1/5] request.py
[2/5] login.py
[3/5] static/screen.css
[4/5] static/print.css
[5/5] images/bird.png

Troubleshooting

Command not found

If you installed the Google Cloud SDK and use the gcloud tool, the appcfg.py command is available from the [SDK_INSTALL_PATH]/google-cloud-sdk/platform/google_appengine/ directory.

For example, to use the Google Cloud SDK, you run the appcfg.py by specifying the directory path:

[SDK_INSTALL_PATH]/google-cloud-sdk/platform/google_appengine/appcfg.py -A [YOUR_PROJECT_ID] -V [YOUR_VERSION_ID] download_app [OUTPUT_DIR]
You do not have permission to download this app version

Only the authenticated user who deployed the version of the application as well as the users with the project Owner role have the privileges to download files. Other users who attempt to download the application will receive an error message similar to the following:

Fetching file list...
Error 403: --- begin server output ---
You do not have permission to download this app version.
--- end server output ---

Send feedback about...

App Engine standard environment for Python