pyramid_appengine

Scaffold for pyramid applications that run on google_appengine
Download

pyramid_appengine Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Tom Willis
  • Publisher web site:
  • https://github.com/twillis/

pyramid_appengine Tags


pyramid_appengine Description

pyramid_appengine is a scaffold to help you get started writing a pyramid aplication that will run on Google App Engine.Installationpyramid_appengine can be installed via pip or easy_install pip install pyramid_appengineOnce installation has completed, an appengine_starter template will be made avaialable to use to create projects. paster create --list-templatesAvailable templates: appengine_starter: Pyramid scaffold for appengine ...Getting StartedTo get started, first create your project skeleton. paster create -t appengine_starter mynewprojectA buildout environment for your project will be created. once complete, run the buildout as usual cd meynewproject /usr/bin/python2.7 bootstrap.py --distribute ./bin/buildoutThe buildout will take care of downloading and installing the App Engine SDK (currently 1.6.3). it will be located in "./parts/google_appengine" all utils for deploying and running the development server will be located in "./bin"Your source code for your project will be located at "./src/mynewproject", a bundle of your source and it's dependencies will be located at "./parts/mynewproject"Running your project for development ./bin/devappserver parts/mynewprojectyour pyramid site will be running on port 8080 so point your browser athttp://localhost:8080Deploying your application to App EngineAssuming you have created an application id "mynewproject" on app engine, the application can be deployed like so. ./bin/appcfg update parts/mynewproject -A mynewproject -V devThen your application will be running at...http://dev.mynewproject.appspot.comWhat It Does And WhyMost pyramid scaffolds create a project directory structure that is an installable through the pip/easy_install . However, App Engine applications do not support that format. Instead App Engine assumes that everything is contained in one directory including all of the projects dependencies not provided by the App Engine run time.So a directory structure for an application deployable to App Engine looks like this.../myproject//myproject/app.yaml/myproject/app.py # some script referenced in app.yaml/myproject/index.yaml/myproject/queue.yaml/myproject/pyramid/myproject/verlruse/myproject/jinja2/myproject/newfangledlibBecause of this directory structure, which is vastly different from what is expected by other tools, we need a way to develop in your typical python egg format, but deploy in an App Engine format.Enter BuildoutBuildout is a tool that can be used to support the kind of setup where you develop your application as an egg but deploy what App Engine expects. If you aren't familiar with buildout you may want to read up on it. It has some of the same goals as virtualenv, but has more features via recipes to help with deployment.For running the buildout you typically do ... /path/to/python bootstrap.py --distribute ./bin/buildoutThe buildout.cfg file distributed with python_appengine does the following.- creates a buildout environment where the source for your project is located at ./src/nameofprojectWhen buildout is run ...- all the dependencies for your project are downloaded and setup in the buildout environment- the appengine sdk is downloaded and installed in the buildout environment under ./parts/google_appengine . Due to python2.7 recently being announced for general availability, and the SDK not able to support 2.7 development yet, the sdk is patched by replacing webob 0.9 with webob 1.1.1. This is done so that you can develop using pyramid version Product's homepage


pyramid_appengine Related Software