Download the code of sample application from GoogleApps - google-app-engine

I have uploaded a sample application to google app engine. Now I would like to download the source code for that sample application which I have uploaded. Is it possible? If yes, how can I do that?

You didn't specify if you are using Java or Python, but here's how you download python application:
http://code.google.com/appengine/docs/python/tools/uploadinganapp.html#Downloading_Source_Code
Run this command for your SDK:
appcfg.py download_app -A <application-id> -V <application-version> <output-dir>

Related

Phpstorm can't upload to google appengine

After following the quickstart for setting up google-app-engine integration into phpstorm here https://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+PhpStorm+as+Google+App+Engine+PHP+IDE
I can't upload code app engine and i get this error message. Is there anywhere in the settings of phpstorm something i shuld change tomake it work?
/usr/bin/python /path/to/google_appengine/appcfg.py -e account#gmail.com --passin --no_cookies update .
Usage: appcfg.py [options] <action>
appcfg.py: error: no such option: --passin
Process finished with exit code 2
JetBrains are a bit behind the updates in the SDK's appcfg.py changes and don't have support for configuring/customizing the upload arguments - I had a similar issue with PyCharm.
My recommendation is to perform the upload from the terminal, using directly appcfg.py following the SDK instructions, instead of uploading from the IDE.

With Google App Engine, why do I now get "command not found" when running the appcfg.py command on my local machine?

This started after I ran the latest gcloud update:
gcloud components update
I used to be able to deploy my app something like this:
appcfg.py update app.yaml
Now I get:
appcfg.py: command not found
Is there a new gcloud command for deploying App Engine apps?
It appears the most recent version of gcloud dropped appcfg.py from the bin directory.
$ ls ~/google-cloud-sdk/bin/
bootstrapping bq dev_appserver.py gcloud git-credential-gcloud.sh gsutil
I found the appcfg.py script under the platform directory:
$ ls ~/google-cloud-sdk/platform/google_appengine
api_server.py dev_appserver.py LICENSE RELEASE_NOTES
appcfg.py ...
By linking it back to the bin directory, I was able to restore the command.
ln -sv ~/google-cloud-sdk/platform/google_appengine/appcfg.py ~/google-cloud-sdk/bin/
Credit to this post for helping me to figure this out.
gcloud app deploy is the preferred way when using gcloud. If you download the stand alone Google App Engine SDK, then you will have appcfg.py available.
https://cloud.google.com/sdk/gcloud/reference/app/deploy
in my case, i needed to run the following:
sudo ln -sv /usr/local/google-cloud-sdk/platform/google_appengine/appcfg.py /usr/local/google-cloud-sdk/bin/
using gcloud app deploy --project project-appengine-id
You'll need to have a billing account
As the standalone Google App Engine SDK is no longer available, if you still need access to appcfg.py (for instance, if you are trying to set up Eclipse for an App Engine Standard project that uses Python 2 according to these instructions), I have found that one way to get it is to just install an older version of the Cloud SDK.
Specifically, appcfg.py was apparently removed in Cloud SDK version 344.0.0 when the Python SDK was updated to version 1.9.93, so you can run:
gcloud components install app-engine-python
gcloud components update --version 343.0.0
and this will give you the most recent version of the app-engine-python component that still had that file.

I want to download code from Google App Engine

I want to update the app in google app store.
But I can't download the code...
Is there any way to update the app without downloading the code?
I tried to download with python, google app engine SDK...
But
appcfg.py download_app -A
This command does not work giving this error
NameError: global name 'execfile' is not defined...
Can you help me with this?
The error you have shown may occur due to incorrect PYTHONPATH environment variable.
If you are using the Windows version of the GAE SDK, then do the following:
1) Go to Edit > Preferences
2) Correct your Python Path.
To know the Python Path in windows do the following in the Python IDLE or Python CMD:
import os
import sys
print os.path.dirname(sys.executable)
For downloading your source code try this:
download_app -A app_name -V version C:\path_to_project
You may or may not need to escape the backslash.
Replace app_name, version and C:\path_to_project with appropriate values
To know the version go to the app engine admin website appengine.appspot.com

Getting Logs from Google App Engine Application deployed on Google app-spot from Ubuntu

How can I get the logs for my application deployed on Google app-spot through Ubuntu Terminal. I have tried the command in the shell script:
$./appcfg.sh request_logs mylogs.txt
but it says that bad-arguments. The application ID for my application deployed on app-spot is 'vikastest111'.
Please help.
Thanks in Advance.
where is appcfg.sh coming from ?
Its not part of the google_appengine distribution.
The standard usage for appcfg.py is
Usage: appcfg.py [options] request_logs <directory> <output_file>
where directory is where you app.yaml is located .
To get specific help for a command do
python ~/google_appengine/appcfg.py request_logs --help
Try:
$./appcfg.sh request_logs /path/to/your/appengine/project mylogs.txt

how to download google appengine (uploaded)application files

I need to download the application files that are deployed using command prompt into google appengine server.
if anybody know about this plz tell me!
thanks in advance!
SDK 1.4.0 has this sort of feature (Python only):
The developer who uploaded an app version can download that version's
code using the appcfg.py
download_app command. This feature can
be disabled on a per application
basis in the admin console, under the
'Permissions' tab. Once disabled,
code download for the application
CANNOT be re-enabled.
Note that although the 'download_app' command is only available in the Python SDK, it can be used to download Java applications from App Engine. If you have a Java app that you want to download, just do:
Install Python (version 2.x only), if necessary.
Install App Engine 1.4.0 (or higher), Python version.
Run the python download_app command as described in the documentation, like appcfg.py download_app -A <your app name> -V <version to download> <path to download to>.
Your Java app will download. Hooray!
It's not possible to download your code from App Engine, unless you included code to support it when you uploaded your app. You can download static files by simply fetching them, of course.
To achieve this, you need to use a source control system, such as SVN or Git, and store/retrieve your code from there - App Engine isn't intended to act as source control.
You can use appcfg.sh / appcfg.cmd in your GAE SDK, as pointed out in this official guide.
But notice that as of 2012-05-07, at least for the Windows version appcfg.cmd, the command's syntax is
appcfg -A yourappid -V yourversionnumber download_app c:\path\to\download\directory
Also notice that when you run this command and you get asked for your password and you happen to have activated Google's 2-step verification, you must not provide your Google password, but instead must provide an application-specific password (which you can generate on this side)
As explained in this post: http://www.labnol.org/software/download-appengine-files/19348/
App Engine 1.5.0 introduced the feature to download your source code.
The command is:
appcfg.py download_app –A MyAppName -V 1 c:\AppEngine\SourceCode
You can use appcfg.py with download_data option, see docs.
You can download an application's source code by running appcfg.py with the download_app action in the Python SDK command-line tool:
appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>

Resources