SlideShare a Scribd company logo
1 of 25
Download to read offline
Google App Engine
Django-style
Python Development on
Google Infrastructure
- Allows deployment of web applications on Google’s famously robust infrastructure.
- Google is a big Python shop - Python is the only language initially supported on AppEngine
- (“Wordle” Google AppEngine application).
• Data Store
• Images
• Mail
• Memcache
• URL Fetch
• Users
App Engine APIs
- Data Store API offers persistent storage in a RDBMS-like environment
- Image API offers uploadable images and transformations such as resize, rotate, crop, flip,
and the mysterious “I’m feeling lucky” transformation.
- Mail API offers email services.
- Memcache API offers use of the same memory caching technology used in production
Django deployments.
- URL Fetch offers HTTP client services, allowing HTTP access to other web services.
- Users API offers integration with Google Accounts.
App Engine Basics
- We’re going to look briefly at creating “Hello World” as an AppEngine app.
Dev Environment
- First you need to download the development environment.
- Nice graphical tools available for Windows and OS X
- Command line tools otherwise available
Dev Environment
- On OS X, the app launcher shows the apps you have available, providing tools to run them
locally and deploy them to Google.
Dev Environment
dev_appserver.py
appcfg.py
- Ultimately this is icing over the command line tools that do the work:
dev_appserver.py is the development web server.
appcfg.py is the tool for uploading your app to Google.
- First you need to create an application at appengine.google.com.
- Currently you are limited to 3 applications, and you must live on the
namespace .appspot.com.
Vanilla App
- From there you can generate a new app. A basic AppEngine app contains three files at
minimum:
1. “app.yaml” is a YAML file that identifies basic information about the application, and maps
URL patterns to “handlers”.
2. “index.yaml” is a YAML file that is used in conjunction with queries to the Data Store
service.
4. “main.py” is the starter “handler” code. It is referenced in “app.yaml”.
app.yaml
- specifies meta-data about the application

 - name

 - version
- specifies “handlers”, somewhat similar to how Apache maps url patterns to handlers.
- handlers are python files.
handler:
main.py
- handler classes subclass RequestHandler
- handler is registered by sending the handler class and the context path to a
WSGIApplication.
- the WSGIApplication is passed to the wsgiref.handlers module (part of standard Python
WSGI).
(WSGI, the Web Server Gateway Interface, is the standard for Python web applications. It is
Django’s goal for 1.0 to be 100% WSGI compliant.)
- The Handler implements methods corresponding to HTTP methods. These methods are
called when an HTTP request comes in that matches the context path set in the
WSGIApplication.
Development
Commands
• dev_appserver.py django-nyc
• appcfg.py update django-nyc
- dev_appserver.py runs the development server for that app, analagous to manage.py
runserver
- appcfg.py will upload the latest version of the application to Google

 - you must have created the app on the AppEngine console before doing this
Where’s the Django?
The Django Helper
project
- Google has a project that allows people to adapt Django projects to Google AppEngine
- Allows for a higher level of abstraction than the vanilla AppEngine apps provide.
appengine_django
- google-app-engine-django provides a new app for you to copy into your project:
appengine_django. You need to add it to your INSTALLED_APPS.
app.yaml
- app.yaml is mostly the same.
- note that /static is routed to a static directory, and not to the python handler
main.py
- main.py is supplied by appengine_django. It uses a built in handler to act as the
RequestHandler - delegating to the Django framework.
- from here the request path becomes standard Django: the settings.py file specifies the
main urls.py file, which in turn delegate to other urls.py files, or maps requests to views.
Data Modeling
- Google doesn’t use a relational database system in the traditional sense.
- The appengine_django app provides an alternate ORM to the application than the standard
Django ORM.
- The familiar Poll app, redone in AppEngine.
- Note that the *Property objects are analogous to Field classes in the Django ORM
There is no spoon
syncdb.
There’s also no admin
console.
W
TF?
http://localhost:8080/_ah/admin
- There is, however, a different kind of development admin console that allows browsing of
data...
http://localhost:8080/_ah/admin
- ...and entry of new data.
Django versions
• 0.96 supported out of the box
• Later versions (trunk) can be supported by
adding Django itself as a module in the
application.
Discussion

More Related Content

What's hot

10x10 HTML5 Script Tag
10x10 HTML5 Script Tag10x10 HTML5 Script Tag
10x10 HTML5 Script Tag
Michelle
 
BDD for RIAs with JavaScript - Skills Matter
BDD for RIAs with JavaScript - Skills MatterBDD for RIAs with JavaScript - Skills Matter
BDD for RIAs with JavaScript - Skills Matter
Carlos Ble
 
Django talk
Django talkDjango talk
Django talk
psibi
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid Prototyping
Drew Morris
 

What's hot (20)

Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Starters with Django
Starters with Django Starters with Django
Starters with Django
 
10x10 HTML5 Script Tag
10x10 HTML5 Script Tag10x10 HTML5 Script Tag
10x10 HTML5 Script Tag
 
Django
DjangoDjango
Django
 
Web Analytics
Web AnalyticsWeb Analytics
Web Analytics
 
Design Patterns for Smart Applications
Design Patterns for Smart ApplicationsDesign Patterns for Smart Applications
Design Patterns for Smart Applications
 
Tango with django
Tango with djangoTango with django
Tango with django
 
OutSystems Tricks & Tips for Complex UI Integrations
OutSystems Tricks & Tips for Complex UI IntegrationsOutSystems Tricks & Tips for Complex UI Integrations
OutSystems Tricks & Tips for Complex UI Integrations
 
Skimlinks & Everyfeed for Drupal
Skimlinks & Everyfeed for DrupalSkimlinks & Everyfeed for Drupal
Skimlinks & Everyfeed for Drupal
 
GDG Atlanta - Angular.js Demo and Workshop
GDG Atlanta - Angular.js Demo and WorkshopGDG Atlanta - Angular.js Demo and Workshop
GDG Atlanta - Angular.js Demo and Workshop
 
Angular.js for beginners
Angular.js for beginners Angular.js for beginners
Angular.js for beginners
 
Building a local web application with Flask
Building a local web application with FlaskBuilding a local web application with Flask
Building a local web application with Flask
 
BDD for RIAs with JavaScript - Skills Matter
BDD for RIAs with JavaScript - Skills MatterBDD for RIAs with JavaScript - Skills Matter
BDD for RIAs with JavaScript - Skills Matter
 
AngularJS workshop for beginners.
AngularJS workshop for beginners.AngularJS workshop for beginners.
AngularJS workshop for beginners.
 
Django talk
Django talkDjango talk
Django talk
 
A Dynamic Analysis Framework for Front-end JavaScript
A Dynamic Analysis Framework for Front-end JavaScriptA Dynamic Analysis Framework for Front-end JavaScript
A Dynamic Analysis Framework for Front-end JavaScript
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid Prototyping
 
AngularJS Basics - Knowledge Sharing
AngularJS Basics - Knowledge SharingAngularJS Basics - Knowledge Sharing
AngularJS Basics - Knowledge Sharing
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 

Viewers also liked

Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011
Juan Gomez
 

Viewers also liked (13)

App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con python
 
App Engine for Python Developers
App Engine for Python DevelopersApp Engine for Python Developers
App Engine for Python Developers
 
Google app engine python
Google app engine   pythonGoogle app engine   python
Google app engine python
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine Python
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
 
Soft-Shake 2016 : Jigsaw est prêt à tuer le classpath
Soft-Shake 2016 : Jigsaw  est prêt à tuer le classpathSoft-Shake 2016 : Jigsaw  est prêt à tuer le classpath
Soft-Shake 2016 : Jigsaw est prêt à tuer le classpath
 
Google datastore & search api
Google datastore & search apiGoogle datastore & search api
Google datastore & search api
 
Google Cloud Platform. Google App Engine
Google Cloud Platform. Google App Engine Google Cloud Platform. Google App Engine
Google Cloud Platform. Google App Engine
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 

Similar to App Engine

Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
Corey Oordt
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Naga Rohit
 
The Rails Engine That Could - In Motion
The Rails Engine That Could - In MotionThe Rails Engine That Could - In Motion
The Rails Engine That Could - In Motion
Andy Maleh
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2
Alessandro Molina
 

Similar to App Engine (20)

Django by rj
Django by rjDjango by rj
Django by rj
 
django
djangodjango
django
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1
 
App engine install-windows
App engine install-windowsApp engine install-windows
App engine install-windows
 
File Repository on GAE
File Repository on GAEFile Repository on GAE
File Repository on GAE
 
Appear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.jsAppear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.js
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
 
How Does Angular Work?
How Does Angular Work?How Does Angular Work?
How Does Angular Work?
 
Infinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App EngineInfinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App Engine
 
The Rails Engine That Could - In Motion
The Rails Engine That Could - In MotionThe Rails Engine That Could - In Motion
The Rails Engine That Could - In Motion
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2
 

More from Loren Davie

More from Loren Davie (11)

Blue Shift Marketing Plan
Blue Shift Marketing PlanBlue Shift Marketing Plan
Blue Shift Marketing Plan
 
Client management workshop for tech
Client management workshop for techClient management workshop for tech
Client management workshop for tech
 
CAVE Language Presentation for AI Camp
CAVE Language Presentation for AI CampCAVE Language Presentation for AI Camp
CAVE Language Presentation for AI Camp
 
Conversational Architecture: World IA Day 2016 NYC
Conversational Architecture: World IA Day 2016 NYCConversational Architecture: World IA Day 2016 NYC
Conversational Architecture: World IA Day 2016 NYC
 
Conversational Architecture, CAVE Language, Data Stewardship
Conversational Architecture, CAVE Language, Data StewardshipConversational Architecture, CAVE Language, Data Stewardship
Conversational Architecture, CAVE Language, Data Stewardship
 
Axilent Tool Talk from Breaking Development 2012
Axilent Tool Talk from Breaking Development 2012Axilent Tool Talk from Breaking Development 2012
Axilent Tool Talk from Breaking Development 2012
 
Django Multi-DB in Anger
Django Multi-DB in AngerDjango Multi-DB in Anger
Django Multi-DB in Anger
 
Django Intro
Django IntroDjango Intro
Django Intro
 
Django Environment
Django EnvironmentDjango Environment
Django Environment
 
Newforms Admin 101
Newforms Admin 101Newforms Admin 101
Newforms Admin 101
 
Model Inheritance
Model InheritanceModel Inheritance
Model Inheritance
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

App Engine

  • 2. Python Development on Google Infrastructure - Allows deployment of web applications on Google’s famously robust infrastructure. - Google is a big Python shop - Python is the only language initially supported on AppEngine - (“Wordle” Google AppEngine application).
  • 3. • Data Store • Images • Mail • Memcache • URL Fetch • Users App Engine APIs - Data Store API offers persistent storage in a RDBMS-like environment - Image API offers uploadable images and transformations such as resize, rotate, crop, flip, and the mysterious “I’m feeling lucky” transformation. - Mail API offers email services. - Memcache API offers use of the same memory caching technology used in production Django deployments. - URL Fetch offers HTTP client services, allowing HTTP access to other web services. - Users API offers integration with Google Accounts.
  • 4. App Engine Basics - We’re going to look briefly at creating “Hello World” as an AppEngine app.
  • 5. Dev Environment - First you need to download the development environment. - Nice graphical tools available for Windows and OS X - Command line tools otherwise available
  • 6. Dev Environment - On OS X, the app launcher shows the apps you have available, providing tools to run them locally and deploy them to Google.
  • 7. Dev Environment dev_appserver.py appcfg.py - Ultimately this is icing over the command line tools that do the work: dev_appserver.py is the development web server. appcfg.py is the tool for uploading your app to Google.
  • 8. - First you need to create an application at appengine.google.com. - Currently you are limited to 3 applications, and you must live on the namespace .appspot.com.
  • 9. Vanilla App - From there you can generate a new app. A basic AppEngine app contains three files at minimum: 1. “app.yaml” is a YAML file that identifies basic information about the application, and maps URL patterns to “handlers”. 2. “index.yaml” is a YAML file that is used in conjunction with queries to the Data Store service. 4. “main.py” is the starter “handler” code. It is referenced in “app.yaml”.
  • 10. app.yaml - specifies meta-data about the application - name - version - specifies “handlers”, somewhat similar to how Apache maps url patterns to handlers. - handlers are python files.
  • 11. handler: main.py - handler classes subclass RequestHandler - handler is registered by sending the handler class and the context path to a WSGIApplication. - the WSGIApplication is passed to the wsgiref.handlers module (part of standard Python WSGI). (WSGI, the Web Server Gateway Interface, is the standard for Python web applications. It is Django’s goal for 1.0 to be 100% WSGI compliant.) - The Handler implements methods corresponding to HTTP methods. These methods are called when an HTTP request comes in that matches the context path set in the WSGIApplication.
  • 12. Development Commands • dev_appserver.py django-nyc • appcfg.py update django-nyc - dev_appserver.py runs the development server for that app, analagous to manage.py runserver - appcfg.py will upload the latest version of the application to Google - you must have created the app on the AppEngine console before doing this
  • 14. The Django Helper project - Google has a project that allows people to adapt Django projects to Google AppEngine - Allows for a higher level of abstraction than the vanilla AppEngine apps provide.
  • 15. appengine_django - google-app-engine-django provides a new app for you to copy into your project: appengine_django. You need to add it to your INSTALLED_APPS.
  • 16. app.yaml - app.yaml is mostly the same. - note that /static is routed to a static directory, and not to the python handler
  • 17. main.py - main.py is supplied by appengine_django. It uses a built in handler to act as the RequestHandler - delegating to the Django framework. - from here the request path becomes standard Django: the settings.py file specifies the main urls.py file, which in turn delegate to other urls.py files, or maps requests to views.
  • 18. Data Modeling - Google doesn’t use a relational database system in the traditional sense. - The appengine_django app provides an alternate ORM to the application than the standard Django ORM.
  • 19. - The familiar Poll app, redone in AppEngine. - Note that the *Property objects are analogous to Field classes in the Django ORM
  • 20. There is no spoon syncdb.
  • 21. There’s also no admin console. W TF?
  • 22. http://localhost:8080/_ah/admin - There is, however, a different kind of development admin console that allows browsing of data...
  • 24. Django versions • 0.96 supported out of the box • Later versions (trunk) can be supported by adding Django itself as a module in the application.