Insight Extractor – Blog

Paras Doshi's Blog on Analytics, Data Science & Business Intelligence.

Sidebar

Subscribe

  • Blog Home
  • Archives
  • About Paras
  • Contact Paras

Social

  • View Paras.Doshi.Blog’s profile on Facebook
  • View paras_doshi’s profile on Twitter
  • View doshiparas’s profile on LinkedIn

Springboard $750 OFF Discount code

Are you an aspiring data science professional? Try Springboard bootcamp that comes with a job placement guarantee! I have personally mentored on this platform for 5+ years and can vouch for it's quality!! Email me contact@parasdoshi.com to get the discount code :)

Blog stats

600+ blogposts
2M+ Visitors
5K+ followers

Disclaimer:

These are my personal views and are meant for Informational purpose only. Please verify the Information via Professional help or via Official references before acting upon the information provided in this Blog.

Here's the Creative Commons License:

Creative Commons License
This Blog by Paras Doshi is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at parasdoshi.com.

Permissions beyond the scope of this license may be available at http://parasdoshi.com/contact/.

Thanks,
Paras Doshi

app title

Uploading a Hello world python app on Google App Engine (with windows as your local OS)

Standard

I assume:

1) you have never installed python platform before.

2) you are new to Google App Engine.

3) you are running windows. if you are running Linux – the process is different. And please refer this for getting started.

4) you have a Google account.

Ok. So let’s get started with developing a hello world python app on windows first and then upload that app to Google App Engine.

1. Get the python development environment for windows.

I opted for Active state python community edition which you can download from: http://www.activestate.com/activepython/downloads

2. Install Google app engine SDK for python.

The second step is to download the Google App Engine SDK for python on windows which you can download from: http://code.google.com/appengine/downloads.html

3. Create an Application on Google and get the APP ID.

Now, let’s sign up for a Google App Engine Account with a Google account you may have. Part of the process includes verification via a code sent to your mobile device – so be ready to provide your mobile number. And every Google Account gets to deploy 10 applications with a Google App Engine admin account.

Now, To sign up for Google APP engine. Go to: https://appengine.google.com/ and if you have a Google Apps account go to: https://appengine.google.com/a/<DOMAIN.COM>

Now, sign in with your Google account and you would be asked to verify your account:

image

FAQ for this process is here: http://code.google.com/appengine/kb/sms.html

Now, once you successfully verify your account, you would see something like:

image

And click on create application and fill in the following details. For now, fill in the App ID and the App Title. Leave other options as default for now. And yes, please check the availability of your app id and this will also be your URL. The URL will take the form.appspot.com

image

Scroll down and you will find a “create application”. please click on it. You will also see a message: “Application registered successfully”. Now, let’s do some coding!

4. Let’s write the Hello World Python app!

create a directory and name it anything you like. I named it “parasdoshipyapp”. But remember the location of the directory – you need it later.

Now,

create a helloworld.py file inside the directory you just created. (you can edit it via notepad or pythonwin). And here is the demo code:

print ‘Content-Type: text/plain’
print ”
print ‘Hello, world!’

Now, you will need to create app.yaml file. Here is the demo code:

application: parasdoshipyapp
version: 1
runtime: python
api_version: 1

handlers:
– url: /.*
script: helloworld.py

Note:

In the first line, you add the app id (remember, we had created an application id in step 3)

And the last line is the file that has the code. In this case, the code is meant to print just couple of lines.

5. Test and upload on Google App Engine via Google App engine Launcher.

open Google App Engine Launcher:

image

Go to File –> create new application, and you will see:

image

Add the app id in the application name and the directory of your app. In my case, it is “parasdoshipyapp” and click on create.

Now let’s test it locally.

image

Click on “Run” to test it locally. Note the port no. In my case it is 8080 so I am going to go and open “http://localhost:8080/” on my browser:

image

It runs and so let’s deploy it on cloud (Google App Engine)

image

click on “deploy”  and enter your Google Account credentials. Note the projects field is your “App ID”

image

Now we you will see the progress of the deploy. Let it do it’s processing and when it has successfully deployed your app, go to the URL and check out your site! Also explore the application dashboard.

And here is a hello world app I deployed! URL: http://parasdoshipyapp.appspot.com/

So that’s about it. I played with Google app engine as a part of an assignment for my UW cloud computing certificate program and I thought about documenting the process so may be it can help someone. Also refer to Google App Engine Getting started documentation here: http://code.google.com/appengine/docs/whatisgoogleappengine.html

Update:

If you are searching for a tutorial to help you get started with Java on Google App Engine. Here’s the tutorial: Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt

32.985909-96.755436

Share this:

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...
  • Date December 12, 2011
  • Tags app title, Google, Google Account, Google APP, Google App Engine, google engine, Linux, Python, python community, python development
  • Comments Leave a comment
  • Twitter
  • Facebook
Proudly powered by WordPress
Theme: Writr by WordPress.com.
 

Loading Comments...
 

    %d bloggers like this: