Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using google app engine SDK in pycharm

i'm using the PyCharm IDE, and I am trying to import webapp2 from the google app engine SDK. Since the module does not come with python, it doesn't recognize it "No module named webapp2".. I am using the pycharm community version, is there anyway around this? can I import the SDK somehow?

like image 813
Steven Avatar asked Jan 18 '14 17:01

Steven


People also ask

Can I create an app using PyCharm?

Creating a Flask application in PyCharm Select Flask in the New Project dialog. In the Location field, provide the path to the project location and type the MeteoMaster as the project name. Leave the rest of the settings default and save the changes. Click Shift+F10 to run the default application.

What is SDK in Google App Engine?

The App Engine SDK allows you to run Google App Engine Applications on your local computer. It simulates the runtime environment of the Google App Engine infrastructure.


2 Answers

PyCharm Community Edition can be configured to work with Google App Engine python and hence webapp2. You won't get all the advantages of PyCharm Professional Edition such as deployment, but you'll be able to do step by step debugging and get code navigation and auto-completion working.

To enable debugging, edit the PyCharm Run/Debug configuration by setting:

  • Script: App Engine's dev_appserver.py
  • Script parameters: --automatic_restart=no --max_module_instances="default:1" .
  • Working directory: your base project folder (the one which contains the app.yaml file)

For more detailed instructions, explanations, and how get code completion working in your PyCharm CE project, see this tutorial.

like image 80
juulcat Avatar answered Sep 28 '22 20:09

juulcat


PyCharm Community Edition does not have support for Google App Engine.

Reference: PyCharm Editions Comparison

Here's the guide which can help you to install webapp2: Quick start (to use webapp2 outside of App Engine)

Note: webapp2 is just the first step, and you will miss PyCharm integration with Google App Engine. If your project requires other Google App Engine services, consider investment into Professional version of PyCharm.

like image 28
kukido Avatar answered Sep 28 '22 20:09

kukido