Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google app engine path in linux?

I'm starting to learn googleapp engine and use python. Whenever i create a new project, should i always include whole bunch of configuration and python files like these,

abhilash@abhilash:~/python_resources/google_appengine$ ls
appcfg.py  bulkload_client.py  demos             google  LICENSE               README         remote_api_shell.py  tools
BUGS       bulkloader.py       dev_appserver.py  lib     new_project_template  RELEASE_NOTES  templates            VERSION

Can i put the dev_appserver.py and others to /bin/bash, so i could use them whenever i create a project? Or how to setup appengine permanently in my workplace?

like image 877
Abhilash Muthuraj Avatar asked Nov 11 '10 06:11

Abhilash Muthuraj


2 Answers

A new GAE project doesn't need any of those files.
Per the Getting Started Guide, all you need is app.yaml and main.py.

If your goal is less command-line typing you can add the google_appengine dir to your PATH in your .bashrc, e.g.

export PATH=$HOME/google_appengine:$PATH

You'll also want to create a symlink to python2.5, like so:

ln -s /usr/bin/python2.5 ~/google_appengine/python

Then you can just do this to run your app on the development server:

$ dev_appserver.py /path/to/myapp/
like image 160
mechanical_meat Avatar answered Sep 30 '22 14:09

mechanical_meat


Also it might be useful to add app engine to your python path as well.

Like so for me that I prefer to keep app engine in /usr/local/

export GAE="/usr/local/google_appengine"
export PYTHONPATH="$PYTHONPATH:$GAE"
export PATH="$PATH:$GAE"

This might come in handy if for example you want to use some of the libraries to run tests on an external module source and so on...

like image 20
Jimmy Kane Avatar answered Sep 30 '22 14:09

Jimmy Kane