Skip to main content

Deploy a Python app on Google Cloud

STEPS:
TUTORIALDIR=src/[YOUR_PROJECT_ID]/python_gae_quickstart-2017-11-01-23-03
git clone https://github.com/GoogleCloudPlatform/python-docs-samples $TUTORIALDIR
cd $TUTORIALDIR/appengine/standard/hello_world
dev_appserver.py $PWD
gcloud app deploy app.yaml --project [YOUR_PROJECT_ID]
The app runs on: https://[YOUR_PROJECT_ID].appspot.com/

Flask App on Google App Engine:

cd $TUTORIALDIR/appengine/standard/flask/tutorial
gcloud app deploy app.yaml --project [YOUR_PROJECT_ID]
Run the Flask app on: https://[YOUR_PROJECT_ID].appspot.com/form
Example: /src/tantal-183814/python_gae_quickstart-2017-11-01-23-03/appengine/standard/flask/tutorial

Using the Container Engine:

https://cloud.google.com/container-engine/docs/quickstart#optional_hello_app_code_review

This example makes use of a web app framework - a web application framework can simplify development by taking care of the details of the interface, letting you focus development effort on your applications features. App Engine includes a simple web application framework called webapp2 - a lightweight framework that allows you quickly build simple web applications for the Python 2.7 runtime.
webapp2 is compatible with the WSGI standard for Python web applications. You don't have to use webapp2 to write Python applications for App Engine. Other web application frameworks, such as Django, work with App Engine, and App Engine supports any Python code that uses the CGI standard. The webapp2 project, by Rodrigo Moraes, started as a fork of the App Engine webapp framework, which was used by the Python 2.5 runtime. webapp2 includes a number of features that make developing web applications easier, such as improved support for URI routing, session management and localization. The Python 2.7 runtime uses webapp2, and the project is maintained externally to App Engine. It is supported, but not maintained, by Google.
For more information about webapp2, see the official documentation.

RUNNING Django + setup a MySQL database instance on AppEngine: 
https://cloud.google.com/python/django/appengine#configure_the_database_settings

Comments

Popular posts from this blog

Quantum Contrapt - Part 01

First short story in the 'CSlueth files' series.  Note: This is purely a work of fiction! 1. The dead body  Wednesday, Chalmers tekniska hogskola, 6:30 PM  He had just walked out of the classroom in the V building. For the past forty five minutes he had been coding an exciting dynamic systems simulation after having completed a late and rather boring simulation exercises session class. He had to take the road in front of the Chalmers Bibliotek library as he wanted to meet a friend staying nearby. As he walked past the Information Sciences department building there was a gust of cold winter wind that struck his face and he raised the collars of this jacket, sinking in his chin into its warm, furry interiors. It was December and it would get dark really early. It was dark now and hardly anyone else around.   He hummed a tune as he ran up the flight of stairs, the library was at an elevated level from the V building. He found himself humming some r...

IIMB PGSEM Star of the Quarter

From the PGSEM Student Affairs Council (SAC) Indian Institute of Management, Bangalore: Star of the Quarter Award is given to an individual who has significantly contributed to PGSEM community through extra curricular activities in an academic quarter, as part of various activities done by PGSEM-SAC and committees. SAC members will nominate significant contributors for the Award and the voting will be conducted among the current batches to decide the Star along with SAC members' points. SAC member is not eligible to be nominated for this award.   You will be getting a mail on voting for Star of the Quarter - Q3 2008-2009. Please take your time to vote for and decide the Star.   A voting happened (to decide amongst 11 equally strong and capable contestants) and guess what? I polled 32.65% of the votes and yes  I won!!  My immense gratitude towards one & all who felt I was worth it!! It takes an institute of IIMB's stature and star students to recognize a STAR! :D Also have t...

DNA newspaper plagiarizes my photographs!

The newspaper DNA (Daily News and Analysis - http://www.dnaindia.com/bangalore ) seems to have involved in not verifying its sources of photographs and having used my photographs (does this amount to plagiarism? I think it does) after it carried some of my pictures in the 'After Hrs' section of its newspaper on 31st January 2009, which I had taken at the IIMB Yamini 2009. It is good that they covered the event but they should have cited/verified the sources of the photographs. In all probability they or their sources just picked up the photos from my blog, with the belief that no one would notice anyways - seems they could not escape as luck would have it, I spotted them in the DNA paper on Saturday. It was early in the morning when as I flipped open the last page of the supplement that I was stunned to see my pics, which I was able to recognize immediately - however there were no credits anywhere in sight! Please check the photos below from the e-paper version on their website...