Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md

README.md

Google-app-engine-Python-hello-world-example-using-Eclipse

Step by step process for setup google app engine in eclipse, Run it locally and deploy it to Google App Engine account.

Tools required

Eclipse with pydev

Download eclipse and Install pydev

In Eclipse , menu, “Help –> Install New Software..” and click on Add

alt text

Put URL http://pydev.org/updates and click Ok. Select “PyDev” option and click on Next restart Eclipse once completed.

alt text

Library required

  1. Python 2.7
  2. Google App Engine SDK for Python

Now Install python 2.7 and Google App Engine SDK for Python

Below steps to show you how to create a GAE project via Pydev plugin

  1. Eclipse menu, File -> New -> project type pydev then choose “PyDev Google App Engine Project“.

alt text

  1. Type project name, if the interpreter is not configure yet you can do it now. And select this option – “Add Project directory to the PYTHONPATH“. click Next

alt text

  1. Click “Browse” button and point it to the Google App Engine installed directory

alt text

  1. Name your application id in GAE, type anything, you can change it later. And choose “Hello Webapp World” template to generate the sample files. click Finish

alt text

  1. Done, 2 files are generated, app.yaml(configuration file) and helloworld.py(python file)

alt text

  1. To run it locally, right click on the helloworld.py, choose “Run As” –> “Run Configuration”, create a new “PyDev Google App Run“. In Main tab -> Main module, manually type the directory path of “dev_appserver.py“. “Browse” button is not able to help you, type manually

alt text

  1. In Arguments tab -> Program arguments, put “${project_loc}/src“.

  2. Click on Apply.

  3. Run it. By default, it will deploy to http://localhost:8080.

alt text

  1. Done. Copy url and paste into the browser.

alt text

Deploy to Google App Engine

  1. Register an account on Google App Engine and create application ID.
  2. Open your “app.yaml” file. Replace your application field with your application ID.
application: sample-app
version: 1
runtime: python27
# threadsafe is required but can be either true or 
# false. For some package, it should be true e.g. Flask
threadsafe: true
api_version: 1

handlers:
- url: /.*
  script: helloworld.app
  1. Create another new “PyDev Google App Run”, In Main tab -> Main module, manually type the directory path of “appcfg.py“.

alt text

  1. In Arguments tab -> Program arguments, put “update ${project_loc}/src“.

alt text

  1. During deployment process you need to have your GAE email and password for authentication. it'll redirect automatic for authentication.

  2. Run your app with URL - https://yourappid.appspot.com

You can’t perform that action at this time.