SETTING UP DEVELOPMENT ENVIRONMENT
FOR GOOGLE APP ENGINE AND PYTHON
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
• Introduction
• Installing GAE SDK
• Make Autocomplete Work For GAE SDK In Pycharm
• Scaffolding Basic GAE App
• Enable Debugging
INDEX
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
INTRODUCTION
• Google App Engine is a PAAS offering from Google Cloud Platform, which enables
you to build complex web solutions with significant ease without worrying too
much about the scalability or infrastructure management
• If you want to develop GAE applications using python and looking for a way to
setup your development environment then this post is for you
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
• This is the easiest part, I am using the windows machine, so I
can simply grab the installer from this link and then install it
following the installation wizard like you have done million
times already
• PyCharm community edition does not come with GAE
support out of the box, so you need to make changes here
and there to make it work for you
INSTALLING GAE SDK
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
MAKE AUTOCOMPLETE WORK FOR
GAE SDK IN PYCHARM
• Typically when you start building an application in python, you start with setting up a virtual environment,
however when you are building GAE application, setting up virtual environment seems an overkill to me, since
GAE in itself works like a container and ensures isolation
• You can also not install GAE packages using pip since those get installed in your machine when you install
SDK
• The most straightforward way to make GAE packages available to PyCharm is, by setting a hard symlink from
GAE packages directory to python site packages directory
To do this you need to open command prompt in elevated access mode (run as admin) and execute following
commands:
mklink /J "C:Python27Libsite-packagesgoogle" "C:Program Files
(x86)Googlegoogle_appenginegoogle"
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
• GAE application needs a few config files in order to get insights about your
project and configure it during deployment in GAE
• You can very well create these files manually following the GAE documentation,
but I find this easier to generate a basic project structure using Google App
Engine Launcher, which gets installed with GAE SDK
• Open the GAE Launcher, go to File->Create New Application, enter application
name and create the application. Do not run the application from GAE launcher,
we were only interested in the generated files
• Now go to the root directory of the generated application, change the name to
whatever you want to name your project and open this directory in PyCharm
SCAFFOLDING BASIC GAE APP
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
In order to debug you GAE application, you need to perform following
steps:
• Go to Run -> Edit Configurations
• Click on the + symbol to add new configuration and select Python
• Enter a name which you can remember like “Execute_GAE”
• In the Script section enter C:Program Files
(x86)Googlegoogle_appenginedev_appserver.py, change the path to point to your
machines GAE installation path
• In the Script parameters section enter --automatic_restart=no --
max_module_instances="default:1"
• In the Working directory section enter the path of the root directory of your project(the
one with the app.yaml in it)
• Tick the share checkbox, it will create a idea configuration file in .idea directory
• Ensure that under File -> Settings -> Build, Execution, Deployment -> Python Debugger
you have Attach to subprocess automatically while debugging option enabled
ENABLE DEBUGGING
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
CASE STUDIES & BLOGS
Read here Read here
BLOGCASE-STUDY
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights reserved.
CONCLUSION
Click here to know more about Talentia work or visit:
ww.talentica.com
Or call us at: +91 20 4660 4000
Thank You !!!

Setting Up Development Environment For Google App Engine & Python | Talentica

  • 1.
    SETTING UP DEVELOPMENTENVIRONMENT FOR GOOGLE APP ENGINE AND PYTHON
  • 2.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. • Introduction • Installing GAE SDK • Make Autocomplete Work For GAE SDK In Pycharm • Scaffolding Basic GAE App • Enable Debugging INDEX
  • 3.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. INTRODUCTION • Google App Engine is a PAAS offering from Google Cloud Platform, which enables you to build complex web solutions with significant ease without worrying too much about the scalability or infrastructure management • If you want to develop GAE applications using python and looking for a way to setup your development environment then this post is for you
  • 4.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. • This is the easiest part, I am using the windows machine, so I can simply grab the installer from this link and then install it following the installation wizard like you have done million times already • PyCharm community edition does not come with GAE support out of the box, so you need to make changes here and there to make it work for you INSTALLING GAE SDK
  • 5.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. MAKE AUTOCOMPLETE WORK FOR GAE SDK IN PYCHARM • Typically when you start building an application in python, you start with setting up a virtual environment, however when you are building GAE application, setting up virtual environment seems an overkill to me, since GAE in itself works like a container and ensures isolation • You can also not install GAE packages using pip since those get installed in your machine when you install SDK • The most straightforward way to make GAE packages available to PyCharm is, by setting a hard symlink from GAE packages directory to python site packages directory To do this you need to open command prompt in elevated access mode (run as admin) and execute following commands: mklink /J "C:Python27Libsite-packagesgoogle" "C:Program Files (x86)Googlegoogle_appenginegoogle"
  • 6.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. • GAE application needs a few config files in order to get insights about your project and configure it during deployment in GAE • You can very well create these files manually following the GAE documentation, but I find this easier to generate a basic project structure using Google App Engine Launcher, which gets installed with GAE SDK • Open the GAE Launcher, go to File->Create New Application, enter application name and create the application. Do not run the application from GAE launcher, we were only interested in the generated files • Now go to the root directory of the generated application, change the name to whatever you want to name your project and open this directory in PyCharm SCAFFOLDING BASIC GAE APP
  • 7.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. In order to debug you GAE application, you need to perform following steps: • Go to Run -> Edit Configurations • Click on the + symbol to add new configuration and select Python • Enter a name which you can remember like “Execute_GAE” • In the Script section enter C:Program Files (x86)Googlegoogle_appenginedev_appserver.py, change the path to point to your machines GAE installation path • In the Script parameters section enter --automatic_restart=no -- max_module_instances="default:1" • In the Working directory section enter the path of the root directory of your project(the one with the app.yaml in it) • Tick the share checkbox, it will create a idea configuration file in .idea directory • Ensure that under File -> Settings -> Build, Execution, Deployment -> Python Debugger you have Attach to subprocess automatically while debugging option enabled ENABLE DEBUGGING
  • 8.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. CASE STUDIES & BLOGS Read here Read here BLOGCASE-STUDY
  • 9.
    Copyright © 2018Talentica Software (I) Pvt Ltd. All rights reserved. CONCLUSION Click here to know more about Talentia work or visit: ww.talentica.com Or call us at: +91 20 4660 4000 Thank You !!!