How do I use the Python SDK for Google Appengine?
I normally use Java development and the Google Eclipse plugin, which integrates GoogleAppEngine deplo开发者_JAVA百科y capability.
Now I have found a Python application with source code that I want to bring into Eclipse and deploy from Eclipse, but I don't even know if Eclipse supports Python.
What do I have to do to deploy the Python app to GAE ?
- Download PyDev from its Eclipse update site.
- Create a new PyDev Google App Engine Project, say using the 'Hello webapp world' template.
- Set the application in app.yaml to your GAE application ID.
- Right-click the src folder of your project and select Run As | PyDev:Google App Run.
- Test the application works as expected in your browser.
- Right-click the src folder of your project and select PyDev:Google App Engine | Upload. Follow the prompts.
- Check that it works on your GAE site.
- Replace the hello webapp world code with your actual application's code and retest locally, then upload again and test.
Take a look at Pydev - http://pydev.org/
I haven't used python via Eclipse at all so I'm not sure how things map to the way Eclipse deploys, but generally to deploy all you need to do is this from the command line:
appcfg.py update <app directory>
You can find more help about using Python with appengine here:
http://code.google.com/appengine/docs/python/gettingstarted/
精彩评论