But first, I need to learn how to tame this beast and get it to do my bidding....
What you need
First off, I am going to assume you have created a Google account and registered to use App Engine (you should be able to access the dashboard). You should also have Eclipse installed with the Google Plugin. I won't get into the details here since the reference links should provide you with adequate tutorials on how to set up each of the components.Next, you should realize that this guide will only deals with Python for the App Engine environment. You can use Java and GO, but that is outside the scope of this guide. So if you don't know it yet, go ahead and brush up on some of your Python skills (and make sure it is installed on your machine AND Eclipse!).
Finally, go ahead and download the Google App Engine SDK for Python. Without this SDK you WILL NOT be able to create any projects!
OK, I'm ready. What's next?
- Fire up Eclipse and from the menu select 'File -> New-> Project'
- Expand the PyDev tree and select PyDev Google App Engine Project
- Give your project a name and check to make sure your settings are correct (for instance, are you using Python 2.5 or 2.7?)
- Did I mention that you need to download the Google App Engine SDK for Python? Download it, extract it, and locate the directory so that Eclipse can use it.
- Select the Python libraries you want to use (Defaults are good for our purposes)
- Now we need our details from Google such as our appid. Log onto the App Engine Dashboard, create an app and enter the appid into Eclipse. Note that for the rest of this tutorial I am going to assume you are using the Hello World template.
- Right click on the project, select 'Run As' and choose the 'PyDev: Google App Run' option
- Depending on how you configured your Google SDK, it will start up a server on your machine on port 8080. Open up a new tab and navigate to http://localhost:8080/
- We should now see 'Hello, World!' on our screen. To upload the app to Google just right click the project and select the 'PyDev: Google App Engine' -> 'Upload' option
- A dialogue will open up and you may have to enter in some parameters such as you email address and password (note: for people who use 2-step verification, you WILL need to create an application specific password).
- Wait until the dialogue displays FINISHED. Once it pops up you can now go to the URL displayed on the Google Apps Dashboard and see your app in action!
References
- The Google developer resource for the App Engine
- Google App Engine downloads (includes SDK's and Eclipse plugins)
- Downloading and Installing the Google Plug-in for Eclipse
- Google App Engine FAQs
- AppCfg Tool
- Jack Slingerland's blog post on Python and Google App Engine
- Dan Poirier blog on Python and Eclipse
- Youtube video "Getting started with Python Programming in GoogleAppEngine"
No comments:
Post a Comment
Thanks for contributing!! Try to keep on topic and please avoid flame wars!!