Force.com for Google App Engine Setup Guide
Force.com for Google App Engine Setup Guide
Abstract
Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow.
The new Force.com for Google App Engine library enables you to access the Force.com platform from Google App Engine Apps - Cloud to Cloud.
This document shows how to check out and install Force.com for Google App Engine. The new library is open source and the source code is hosted in a subversion repository on Google Code. After establishing a few prerequisites, we show how to install and configure Subclipse (the Eclipse subversion plug-in), Pydev (the Eclipse Python plug-in), the Python Runtime Environment, the Google App Engine SDK and finally how to check out the Force.com for Google App Engine code from the repository. Once you've done this, head over to one of the other documents in the Related Content section.
Prerequisites
Before proceeding to check-out the Force.com for Google App Engine library source code, please note that these instructions assume you have the Force.com IDE installed and are familiar with the basic functionality of Eclipse. If not, take some time to become familiar with both before proceeding to check-out the source code from the Google repository.
In addition, these steps require that you have installed these plug-ins in Eclipse: Subclipse for interacting with the Subversion Revision Control System (aka SVN) and Pydev for editing Python code in Eclipse.
Note: Alternatively, if you are not familiar with SVN and source code repositories, you may also use the convenient ZIP file distribution instead of the SVN source repository. if you prefer this approach then you will not need to install the Subclipse for SVN Eclipse Plugin and you may proceed to Renaming your Application.
Installing Subclipse for SVN Eclipse Plugin
Because this is an important feature, please install the subclipse add-in and become familiar with the documentation it provides. If you have used SVN in the past, you may be able to install the subclipse add-in and proceed with the following steps. Follow the instructions here: http://subclipse.tigris.org/install.html
- Be sure to uncheck Integrations containing Buckminster and Subclipse Integration for Mylyn during the plugin installation.
- If this is the first time you have used SVN, please read the supporting documentation that comes with the Subclipse add-in.
Installing Pydev Eclipse Plugin
Pydev is an Eclipse plugin that enables Python development—making Eclipse a first class Python IDE. It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. To install Pydev:
- Open Eclipse and go to Help->Software Updates->Find and Install.
- Select "Search for New Features to Install" and Click "Next".
- Un-check all choices under "Sites to include in search" and then Click the button "New Remote Site".
- You will get a little pop-up dialog box titled "New Update Site".
- Enter Name: "Pydev", URL: "http://pydev.sourceforge.net/updates/".
- Click Finish.
For additional information on Pydev please refer to the Sourceforge Pydev website.
Installing The Python Runtime Environment
Google App Engine uses Python 2.5.2. If necessary, download and install Python 2.5.2 for your platform from the Python website. Mac OS X 10.5 Leopard users already have Python 2.5 installed. The App Engine Python runtime environment includes a specialized version of the Python interpreter, the standard Python library, libraries and APIs for App Engine, and a standard interface to the web server layer.
- Download and install Python 2.5.2 from the Python Website
For more information about Python, see the Python website and the documentation http://www.python.org/download/releases/2.5.2/
Installing The Google App Engine SDK
You develop and upload applications for Google App Engine using the App Engine software development kit (SDK).
The SDK includes a web server application that simulates the App Engine environment, including a local version of the datastore, Google Accounts, and the ability to fetch URLs and send email directly from your computer using the App Engine APIs. The SDK runs on any computer with Python 2.5, and versions are available for Windows, Mac OS X and Linux.
To download, install and configure the SDK, please follow the instructions in the Google App Engine Development Environment Getting Started Guide
Downloading the Source Code
The next step is to download a copy of the source code. The new library is open source and the source code is hosted in a Google Code Repository.
There are two alternative ways to download the new library.
- Check out the source code from the Google Code SVN Repository.
- Download the ZIP file distribution of the source code from the Google Code force-app-engine project site.
Checking Out the Source Code from the Google SVN Repository
Steps to Checkout
- In Eclipse, choose the SVN Repository Exploring perspective in the upper right-hand corner.
- If this is not available, go to the Window menu, select "Open Perspective", choose "Other", then from the menu that appears, select "SVN Repository Exploring".
- Right-click in the SVN Repository Explorer and select New > Repository Location.
- Specify the URL of the repository:
- Click Finish.
- Expand the SVN repository until you see the force-app-engine folder.
- Right-click on the folder and choose Checkout.
- Select "Check out as a project in the workspace". Accept the other defaults and click "Finish".
- Now, use the pull-down menu in the upper right-hand corner of Eclipse to switch to the Force.com perspective.
- If this is not available, go to the "Window" menu, select "Open Perspective", choose "Other", from the menu that appears, select "Force.com".
- In the Package Explorer, expand the force-app-engine folder to verify that you have the following:
force-app-engine
python
beatbox
__init__.py
_beatbox.py
marshall.py
python_client.py
xmltramp.py
css
styles.css
static
home.html
simple_login.html
templates
acct_lookup.html
simple_login_failed.html
simple_login_result.html
acct_lookup.py
app.yaml
index.yaml
main.py
simple_login.py
unit_test.py
You should now have the Force.com for Google App Engine library source code in a new Eclipse project called force-app-engine.

Renaming your Application
Important: Now that you have the source code in an Eclipse project, the next step is to rename your application. The application name must match the Application Name name in your Google App Engine account. Instructions:
- Expand your new Eclipse project.
- Open the file called "app.yaml".
- Find the line: "application: force-demo"
- Change force-demo to your own app name as it is listed in your Google App Engine account
- Example: application: your-app
Running the Code Locally
The App Engine SDK includes a web server application for developing and testing App Engine applications. The web server reproduces the App Engine Python runtime environment including sandbox restrictions, and emulates the App Engine services such as the datastore.
Deploying Code to Google App Engine
The App Engine SDK includes a command "appcfg.py" for uploading application files. As with the rest of the SDK, appcfg.py runs on any computer with Python 2.5.
To upload or update 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 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.
You can specify the email address on the command line using the --email option. You cannot specify the password as a command line option.
Please refer to the Uploading an App in the Google App Engine Documentation for additional information on uploading Apps to Google App Engine.
Related Content
- The home page for Force.com for Google App Engine
- The Force.com for Google App Engine User Guide





