Paras Doshi – Blog

Menu

Skip to content
  • Blog Home
  • Archives
  • About Paras
  • Contact Paras

Tag Archives: python development

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

Posted on December 12, 2011 by Paras Doshi • Posted in cloud computing • Tagged app title, Google, Google Account, Google APP, Google App Engine, google engine, Linux, Python, python community, python development • 4 Comments

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&gt;

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

Rate this:

Was this helpful? Share it!

  • Pin It
  • More
  • DZone
  • Digg
  • Share on Tumblr
  • Print
  • Email

Like this:

Like Loading...

Post navigation

Search on ParasDoshi.com:

About this Blog:

Information is the NEW oil and Blogging is one mechanism to share Information. In this blog, Paras share's information about amazing technologies that he get to work with!

MCC award recipient

Paras Doshi Microsoft Community contributor 2011 MCC

Featured on Wordpress’s Freshly Pressed

Paras Doshi Blog Freshly Pressed Wordpress

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 804 other followers

Subscribe Via RSS

  • RSS - Posts
  • RSS - Comments

Let’s connect and converse on any of these people networks:

paras doshi blog on facebookparas doshi twitter paras doshi google plus paras doshi linkedin

Top Posts & Pages:

  • How to disable the password expiration policy in Windows Server 2008 R2 (Demo Machine) ?
  • Cloud Models (IaaS, PaaS, SaaS) explained with examples
  • How to Include Charts in Visual Studio 2008 Express Edition using Microsoft chart controls
  • Microsoft® HDInsight Preview for Windows: How to use Sqoop to load data into HDFS from SQL Server?
  • Seven software delivery models and why software as a service (SaaS) is the future!

Recent Posts:

  • Data Analysis and In Memory Technologies, let’s connect the dots:
  • The role of Sentiment Analysis in Social Media Monitoring:
  • How conditionally formatting your data in Excel can help you save time in answering business questions?
  • Resource: Introduction to Data Science by Prof Bill Howe, UW
  • Unpivoting data using the data explorer preview for Excel 2010/2013:

Books

List of Books i have read in no particular order

Tags

Apache Hadoop azure BigData Big Data Business Business intelligence Cloud computing Data Data analysis Database Databases Data mining Data quality Data Quality Services Data set Data Warehousing DQS Excel Facebook Google Hadoop Knowledge base Machine learning MapReduce Master data management Microsoft Microsoft Excel Microsoft SharePoint Microsoft SQL Server Microsoft Windows Powerpivot Programming Social media Spreadsheet Spreadsheets sql sql azure sqlazure sql server SQL Server Integration Services SQL Server Management Studio Technology Twitter United States windows azure

Shout out to community members who liked/comented one or more blog-post, Thanks!

Connect with me on Facebook Page:

Connect with me on Twitter:

  • RT @lynnlangit: re-posting due to requests 'Life Behind GLASS' - my review includes unedited video and photos taken with GLASS #io13 http:/… 2 days ago
  • BBC Documentary: Joy of Stats featuring Hans Rosling: bit.ly/rEQVyF bit.ly/rEQVyF 5 days ago
  • RT @kdnuggets: Social Market Analytics mines Twitter to create S-score for Stock Picks, partners with NYSE bit.ly/17ZByBU 5 days ago
Follow @Paras_Doshi

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
ParasDoshi.com 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

Blog at WordPress.com. Theme: Skylark by Blank Themes.
Follow

Get every new post delivered to your Inbox.

Join 804 other followers

Powered by WordPress.com
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this: