English | Site Directory

Uploading an App

The App Engine SDK includes a command for uploading application files. As with the rest of the SDK, appcfg.py runs on any computer with Python 2.5.

To upload application files, run the appcfg.py command with the update action and the name of your application's root directory. The root directory should contain the app.yaml file for the application.

appcfg.py update myapp/

appcfg.py gets the application ID from the app.yaml file, and prompts you for the email address and password of your Google account. After successfully signing in with your account, appcfg.py stores a "cookie" so that it does not need to prompt for a password on subsequent attempts.

To save on a prompt, you can specify the email address on the command line using the --email option. You cannot specify the password as a command line option.

appcfg.py --email=Albert.Johnson@example.com update myapp/

appcfg.py Options

The appcfg.py command takes a set of options, an action, and arguments for the action.

The following actions are available:

appcfg.py [options] update <app-directory>

Uploads files for an application given the application's root directory. The application ID and version are taken from the app.yaml file in the app directory.

appcfg.py [options] rollback <app-directory>

Undo a partially completed update for the given application. You can use this if an update was interrupted, and the command is reporting that the application cannot be updated due to a lock.

appcfg.py [options] vacuum_indexes <app-directory>

Delete unused datastore indexes in App Engine. If an index definition is removed from index.yaml, the index is not deleted automatically when the application is uploaded because it may be in use by another version of the application. Run this action when all old indexes are no longer needed.

appcfg.py help <action>

Print a help message about the given action, then quit.

The appcfg.py command accepts the following options for all actions:

--quiet

Do not print messages when successful.

--verbose

Print messages about what the command is doing.

--noisy

Print many messages about what the command is doing. This is mostly useful when working with the App Engine team to troubleshoot an upload issue.

--email=...

The email address of the Google account of an administrator for the application, for actions that require signing in. If omitted and no cookie is stored from a previous use of the command, the command will prompt for this value.

--server=...

The App Engine server hostname. The default is appengine.google.com.

--host=...

The hostname of the local machine for use with remote procedure calls.

--no_cookies

Do not store the administrator sign-in credentials as a cookie; prompt for a password every time.

--force

Force deletion of unused indexes. By default, uploading an app does not delete unused indexes from the server, even if they do not appear in the index.yaml file.

--max_size=...

A maximum size of files to upload, as a number of bytes. Files larger than this size will not be uploaded. The default is 1048576. The server currently enforces a maximum file size of 1,048,576 bytes, so increasing this value will not have any effect.

appcfg.py and HTTP Proxies

If you are running appcfg.py behind an HTTP proxy, you must tell appcfy.py the name of the proxy. To set an HTTP proxy for appcfg.py, set the http_proxy environment variable. For example, in the bash shell:

export http_proxy="http://cache.mycompany.com:3128"
appcfg.py update myapp