I can't seem to be able to add the Google App Engine Python runtime on IntelliJ. I tried to add an additional Python SDK and configure my project to use that, but I can't find the correct Python runtime to point to.
Note that I'm not interested in using the PyCharm IDE, and want to maintain the polyglot IntelliJ IDE setup.
My setup:
IntelliJ Ultimate 13.1
Python plugin
Google App Engine Plugin
Google Cloud SDK
Relevant links:
https://cloud.google.com/sdk/
http://plugins.jetbrains.com/plugin/?id=631
https://www.jetbrains.com/pycharm/quickstart/appengine_guide.html
You probably solve this task and find right approach for you.
I'll just add my solution for this task for IntelliJ 2016 and later, probably earlier version too.
At first, I advise you to crate virtualenv. And install gcloud and Google App Engine itself using cloud toolkit.
Next, open in IDE your project by selecting proper folder.
Go to File > Project structure (Mac) and in Project Settings section > Project, in Project SDK drop-down choose /or set your newly crated virtualenv.
After that, go to Modules in the same section, and hit + sign. Choose New Module from context menu. Go to Python section, and there mark Google App Engine (Python) checkbox. Set your Application ID in proper field beneath checkbox list, and choose path to Google App Engine SDK. If you set SDK trough gcloud toolset, you can get right path by using gcloud info command in console by your favour. Path that you are looking for is Installation Root and add /platform/google_appengine to it.
Congratulations. You are good to go!
Related
I want to access the folder /store/ariel/events/payloads/ in the Qradar directories from the App editor. I am trying the os.path.exists however it returns false however, the folder exists as well as the path is located if I run the script in the linux kernel of the Qradar. I would really appreciate if anyone can guide me on how to access the directories from the Qradar App Editor.
Can't do it, unfortunately.
In QRadar, Apps can only interact with the rest of the deployment via API calls.
The App Framework guide can provide some more details about what's available to App developers.
My colleague and I both have Macs, and we both have PyCharm Professional, same version (2016.3.2) and build (December 28, 2016). We use a repository to keep our project directories in sync, and they are currently identical. Under Preferences, we both have "Enable Google App Engine support" checked, and we both have the same directory shown as "SDK directory", with the same files in that directory.
When I choose menu option Tools > Google App Engine > Upload App Engine app..., the App Config Tool panel appears at the bottom of my PyCharm window. The first line is:
/usr/bin/python
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py
update .
and the last line is:
appcfg.py >
I can also run that update command from a Terminal window.
Meanwhile, my colleague can also run the update command from a Terminal window. But when he runs menu option Tools > Google App Engine > Upload App Engine app..., the App Config Tool panel only shows:
appcfg.py >
We've researched this extensively and made many attempts at repair, no luck so far. Any help will be most appreciated.
I did a clean install recently, and not using the AppEngineLauncher anymore - not sure it even ships with the newer SDK.
My GAE is located here:
/usr/local/google-cloud-sdk/platform/google_appengine
Looks like you might be using an older version of AppEngine SDK
I have an App Engine app contains 3 modules and a dispatch.yaml. It works perfectly in production, however on the dev server (using GAE Launcher) only the default module is loaded.
The command which is run by the launcher:
Running command: "['D:\\Python27\\pythonw.exe', 'D:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=10081', '--admin_port=8002', 'D:\\path\\to\\my\\app']"
I know that when running dev_appserver.py using the command line it is possible to specify all modules as arguments. Is there a way of doing it when using the Launcher?
I believe this is done the same way as you do for an IDE like PyCharm, where you pass the yaml files (for each module) in the Extra Flags section.
Double-click the instance in App Engine Launcher
Under Extra Flags, add all the yaml files for your modules, separated by a space "app.yaml app2.yaml app3.yaml"
Bardia's answer is correct. However, after experiencing the problem myself and speaking with a GAE support engineer, I've added some further details. This information is currently missing from the official GAE documentation, but Google are planning to add it soon.
To use Google App Engine Launcher to 'Run' or 'Deploy' an application that uses modules you first need to:
Double click the application in Google App Engine Launcher, to bring up the Application Settings window.
Under Extra Flags, list the yaml files separated by spaces. Specify the full file path. If you are using a routing file, dispatch.yaml, list it first. Don't include app.yaml as this is already included by default.
e.g. /Users/.../dispatch.yaml /Users/.../app2.yaml /Users/.../app3.yaml
There is also a blog post, which explains how to do it, here:
http://www.shiftedup.com/2014/11/11/running-modules-locally-using-the-googleappenginelauncher-application
Update
Yaron commented that this method only works when you click the 'Run' button to run on localhost, but it doesn't work when you click 'Deploy' to deploy to production. I checked and I had the same problem, so I contacted Google support. They advised me that Google App Engine Launcher is now archived and is no longer supported. Instead we should use the new 'gcloud preview app deploy' command.
To deploy multiple modules, type the following into the command line:
gcloud preview app deploy ~/my_app/app.yaml \
~/my_app/another_module.yaml
Which is a shame, because I quite liked Google App Engine Launcher.
How do I get Eclipse to load the Google python SDK?
I am using OSX 10.6, I have Eclipse (helios) and I have downloaded the GoogleAppEngineLauncher and the Eclipse plugin.
When I try to start a new web app project its asks for the SDK. I enter my location as follows:
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
But all I get is Failed to initialize!
What I have Done wrong? any suggestions?
You shouldn't need to install the Google App Engine SDK/Launcher separately if using Eclipse. The Google Plugin for Eclipse will install the App Engine SDK/Launcher for you:
http://code.google.com/eclipse/
In the event you need to install them separately, it does appear you've got a space in your path between "Resources" and "GoogleApeEngine-default.bundle". Also, have you verified the path in question, the path to google_appenine, is valid?
I m starting to build python application in windows platform using google appengine
whats the steps to debug and run my application
On Windows I use Aptana.
Once you've installed that, run it, go to the Plugins tab and get Pydev.
Pydev has inbuilt support for google app engine - so you can create an app engine project, and then run or debug it. See these posts for more details:
http://pydev.blogspot.com/2009/05/testing-on-pydev-146-google-app-engine.html
http://pydev.blogspot.com/2009/05/pydev-146-released-google-app-engine-on.html