App Engine config file

App Engine config file

Lesson Details:
June 29, 2020


I: Introduction

A: Web development is the development of web-based software. It is the concept of applying principles of web design, web content management, and other related areas to create interactive web sites.

II: Body

A: App engine config file

B: The app engine config file contains all the configuration information for the application. It is a Python file which you can edit by calling the update_config() method.

C: Here are the main configurations that you should be concerned with

D: 1. TIME_ZONE

E: This timezone specifies the timezone that your application should use. If not specified, it will default to UTC. However, if you are targeting users in multiple timezones, you may choose to specify multiple timezones here. For example, you can set certain timezones to use PST (Pacific Standard Time) while others are using EST (Eastern Standard Time).

F: 2. APPENGINE_RUNTIME

G: The app engine runtime specifies the version of python that should be used for running this application. Note that the app engine runtime is independent of the Python runtime that you may be using on your local machine.

H: 3. DEBUG_MODE

I: The debug mode specifies the mode in which your application should run in development. If True, it runs in debug mode so that you can easily use the web debugger to step through your code and inspect variables. Otherwise, it runs in production mode for speed optimization. The default value is False.

J: 4. INSTANCE_TYPE

K: The instance type specifies the compute resources that will be made available to your application for processing requests. The higher the instance type, the more resources that will be made available to your application for serving requests. The minimum instance type is free (0.5 GB RAM) and all resources beyond what is required to serve requests will be charged for under the Compute Engine pricing model. An instance type of small (1 GB RAM) or medium (2 GB RAM) is recommended for most applications. Large (4 GB RAM) or extra large (8 GB RAM) instances are recommended only if your application requires many requests to be processed simultaneously.

L: 5. DISK_SIZE

M: The disk size specifies the amount of persistent storage that will be made available to your application for persisting data across instances of your application and over time. For example, if you set the disk size to 1GB, then at most 1GB of information will be stored on persistent storage and will be available on every instance of your application and will persist over time even after instances have been terminated and new instances have been deployed and started up. If not specified, the disk size defaults to 0 (no persistent storage). Note that there is no performance benefit to setting a larger disk size unless you actually make use of this persistent storage on your applications by storing objects in it or making calls to it from within your code. In fact, it may actually be slower depending on how much data you store on disk and how often you access it because keeping track of this data and accessing it from disk may add overhead compared to just keeping track of it in memory and accessing it from memory. If you do need persistent storage for your applications we recommend using Google Cloud Storage instead of setting a disk size in your app engine configuration files because Google Cloud Storage has better performance and is more cost effective than storing data on disk in Google Compute Engine instances. Note: By default, each application gets a maximum of 1GB of persistent storage per instance type. To request more persistent storage per instance type, see Requesting Additional Persistent Storage.

N: 6. PYTHON_VERSION

O: This specifies which version of Python should be executed for this application. If not specified, it will default to whatever version of Python was used when you created this app engine project. If you change this value, bear in mind that certain Python features may not work correctly until you update the runtime version in the app engine config file with a newer version of Python than what was used to create your app engine project. For example, if you changed PyPy from v1.9 to v2.0 but didn’t change the runtime version in the app engine config file from v1.9 to v2.0 then attempts to import a library using the new 2.0 syntax may fail because this syntax wasn’t supported in v1.9 of PyPy. To fix this problem, change the runtime version in your app engine config file from v1.9 to v2.0 as well so that when a request comes in for a v2.0 runtime environment the app engine runtime server will know to load up PyPy v2.0 instead of v1.9. You can also specify an exact version like v2.0 or v1.9 if you want to lock down exactly which version should be used to run your application here instead of letting the app engine runtime server determine which version to use based on its understanding of which version is appropriate given its understanding of various factors about your environment like which Python runtime environments are installed on your computer or what versions are supported by different libraries that may already be installed on your computer or available to download from places like PyPi etc… Note that changing this setting will cause all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if they were created before this setting was changed here! Note also that changing this setting may break certain libraries that rely on specific behavior only supported by older versions of Python so be careful when changing this setting here! Note also that changing this setting causes all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if they were created before this setting was changed here! Note also that changing this setting may break certain libraries that rely on specific behavior only supported by older versions of Python so be careful when changing this setting here! Note also that changing this setting causes all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if they were created before this setting was changed here! Note also that changing this setting may break certain libraries that rely on specific behavior only supported by older versions of Python so be careful when changing this setting here! Note also that changing this setting causes all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if they were created before this setting was changed here! Note also that changing this setting may break certain libraries that rely on specific behavior only supported by older versions of Python so be careful when changing this setting here! Note also that changing this setting causes all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if they were created before this setting was changed here! Note also that changing this setting may break certain libraries that rely on specific behavior only supported by older versions of Python so be careful when changing this setting here! Note also that changing this setting causes all instances of all applications created with this project to restart so be sure to do it during a quiet time when other users won’t be affected by instances restarting suddenly due to changes in this setting here! Also note that changing this setting will only affect new instances created after this setting is changed so any existing instances still using old versions of Python will continue to operate even if

loader
Course content