Python For Google App Engine

Python For Google App Engine: Master the full range of development features provided by Google App Engine to build and run scalable web applications in Python

Download

Introduction

What this book covers 
Chapter 1, Getting Started, will help you get your hands dirty with a very simple functional Python application running on a production server. The chapter begins with making a survey of Google's cloud infrastructure, showing where App Engine is placed and how it compares to other well-known cloud services. It then walks readers through downloading and installing the runtime for Linux, Windows, and OS X, coding a Hello, World! application and deploying it on App Engine. The last part introduces administration consoles both for the development and production servers.

Chapter 2, A More Complex Application, teaches you how to implement a complex web application running on App Engine. It begins with an introduction to the bundled webapp2 framework and possible alternatives; then, you will get in touch with user authentication and form handling and then an introduction to Google's Datastore nonrelational database. The last part shows you how to make HTML pages through templates rendering and how to serve all the static files needed to style the page.

Chapter 3, Storing and Processing Users' Data, will show you how to add more functionalities to the app from the previous chapter. The chapter begins by showing you how to let users upload files using Google Cloud Storage and how to manipulate such files when they contain image data with the Image API. It then introduces you to the task queues used to execute long jobs (such as image manipulation) outside the request process and how to schedule batches of such jobs. The last part shows you how to send and receive e-mails through the Mail API.

Chapter 4, Improving Application Performance, begins by showing how to improve application performance using advanced features of Datastore. It then shows you how to use the cache provided by App Engine and how to break the application into smaller services using Modules.

Chapter 5, Storing Data in Google Cloud SQL, is dedicated to the Google Cloud SQL service. It shows you how to create and manage a database instance and how to connect and perform queries. It then demonstrates how an App Engine application can save and retrieve data and how to use a local MySQL installation during development.

Chapter 6, Using Channels to Implement a Real-time Application, shows you how to make our application real time, in other words, how to update what clients see without reloading the page in the browser. The first part shows how the Channel API works, what happens when a client connects, and what roundtrip of a message is from the server to the client. Then, it shows you how to add a real-time feature to our application from previous chapters.

Chapter 7, Building an Application with Django, teaches you how to build an App Engine application using the Django web framework instead of webapp2. The first part shows you how to configure the local environment for development, and then the application from previous chapters is rewritten using some of the features provided by Django. The last part shows you how to deploy the application on a production server.

Chapter 8, Exposing a REST API with Google Cloud Endpoints, shows you how to rewrite part of our application to expose data through a REST API. The first part explores all the operations needed to set up and configure a project and how to implement a couple of endpoints for our API. The last part shows explores how to add OAuth protection to the API endpoints.

What you need for this book
In order to run the code demonstrated in this book, you need a Python interpreter for version 2.7.x and the App Engine Python SDK as described in the Download and installation section from Chapter 1, Getting Started. Additionally, to access the example application once it runs on App Engine, you need a recent version of a web browser such as Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Internet Explorer.

Who this book is for
If you are a Python programmer who wants to apply your skills to write web applications using Google App Engine and Google Cloud Platform tools and services, this is the book for you. Solid Python programming knowledge is required as well as a basic understanding of the anatomy of a web application. Prior knowledge of Google App Engine is not assumed, nor is any experience with a similar tool required.

By reading this book, you will become familiar with the functionalities provided by Google Cloud Platform with particular reference to Google App Engine, Google Cloud Storage, Google Cloud SQL, and Google Cloud Endpoints at the latest versions available at the time of writing this book.
Share This